Skip to content

Commit

Permalink
#792: Guard against incorrect JPEG Huffman Table class
Browse files Browse the repository at this point in the history
  • Loading branch information
haraldk committed Aug 21, 2023
1 parent e3ebf8e commit 608b372
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ public static Segment read(final DataInput data, final int length) throws IOExce
}

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;
Expand Down

0 comments on commit 608b372

Please sign in to comment.