Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.97
-
None
-
None
-
Windows, Unix
Sun Java JVM (multiple versions)
Description
In order to extract JPEG image dimensions, Apache Commons Sanselan (0.97) was used as follows:
File imgfile = new File("./test.jpg");
org.apache.sanselan.Sanselan.getImageInfo(imgfile);
For most JPEG images, this code works as expected. However with specific JPEG files, the call to getImageInfo() causes a repeatable java.lang.OutOfMemoryError or java.lang.NegativeArraySizeException - depending upon the input JPEG file. The same files can be processed with javax.imageio.ImageReader without such issues.
The OutOfMemoryError is especially serious as it may cause JVM to fail.