#792: Guard against incorrect JPEG Huffman Table class

This commit is contained in:
Harald Kuhr 2023-08-21 13:09:11 +02:00
parent e3ebf8e0fa
commit 608b37232d

View File

@ -145,8 +145,8 @@ final class HuffmanTable extends Segment {
}
int c = temp >> 4;
if (c > 2) {
throw new IIOException("Unexpected JPEG Huffman Table class (> 2): " + c);
if (c > 1) {
throw new IIOException("Unexpected JPEG Huffman Table class (> 1): " + c);
}
table.tc[t][c] = true;