mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-05-01 00:00:02 -04:00
Fix for erroneous encoded ccitt lines
The ccitt tiff is missing a terminating huffman code on a line end. The following EOL is misinterpreted and the codestream read till an ArrayIndexOutOfBoundsException occurs. Now reading the line is aborted as soon as an EOL is found.
This commit is contained in:
+5
-2
@@ -355,11 +355,14 @@ final class CCITTFaxDecoderStream extends FilterInputStream {
|
||||
|
||||
if (n.isLeaf) {
|
||||
total += n.value;
|
||||
if (n.value < 64) {
|
||||
if (n.value >= 64) {
|
||||
n = tree.root;
|
||||
}
|
||||
else if (n.value >= 0) {
|
||||
return total;
|
||||
}
|
||||
else {
|
||||
n = tree.root;
|
||||
return columns;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user