Details
-
Bug
-
Status: Open
-
Resolution: Unresolved
-
0.20.5
-
None
-
None
-
Operating System: other
Platform: Other
-
22450
Description
Look at the JPEGReader class in the org.apache.fop.image.analyzer package. In
the setDimension(...) method, can have an unterminated iteration. Why?
The method reads bytes from input stream, with a:
while ((marker = imageStream.read()) != MARK) {
...
}
Look at the description of the BufferedInputStream.read() method.: "If no byte
is available because the end of the stream has been reached, the value -1 is
returned.".
In the above iteration the author missed check this condition, so the method can
iterate over and over.
Sollution:
Check the end condition.
best regards: Zsolt Kulcsar