United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-5039494 : PNGImageReader.read does not throw IAException when dest width/height < 1

Details
Type:
Bug
Submit Date:
2004-04-28
Status:
Resolved
Updated Date:
2004-09-07
Project Name:
JDK
Resolved Date:
2004-09-07
Component:
client-libs
OS:
generic
Sub-Component:
2d
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Relates:

Sub Tasks

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
PUBLIC COMMENTS

PNGImageReader.read does not throw IllegalArgumentException when dest width/height < 1
                                     
2004-09-08
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.

======================================================================
                                     
2004-09-08
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mustang

FIXED IN:
mustang

INTEGRATED IN:
mustang


                                     
2004-09-08



Hardware and Software, Engineered to Work Together