JDK-5039494 : PNGImageReader.read does not throw IAException when dest width/height < 1
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-04-28
  • Updated: 2004-09-07
  • Resolved: 2004-09-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 mustangFixed
Related Reports
Relates :  
Description
The specification for ImageReader.read states that an IllegalArgumentException will be thrown if the param provided is such that the resulting image would have a width or height less than 1. 
       
The PNG ImageReader does not throw an IllegalArgumentException in the above scenario, therefore not following the specification. A test case demonstrating this is attached. On running the test, use the scrollbar to view regions to the right, this should cause an Exception, but does not.


Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang FIXED IN: mustang INTEGRATED IN: mustang
08-09-2004

EVALUATION Name: abR10136 Date: 04/29/2004 The PNG image reader does not take into account the size of the destinaton image and does not detect if the destination region is empty. This behaviour does not conform the spec. The solution is to use ImageReader.computeRegions() in order to calculate the source and destination regions. This ensures that the validity of source and destination region will be verified. ======================================================================
08-09-2004

PUBLIC COMMENTS PNGImageReader.read does not throw IllegalArgumentException when dest width/height < 1
08-09-2004