[OpenJDK 2D-Dev] <OpenJDK 2D-Dev> Review request for JDK-8066904: NullPointerExcpetion when calling ImageIO.read() with corrupt BMP
Jayathirth D v
jayathirth.d.v at oracle.com
Tue Oct 6 04:21:41 UTC 2015
Hi Sergey,
Thanks for review.
Hello All,
I need one more review for this patch. Please review.
Thanks,
Jay
On 10/5/2015 7:01 PM, Sergey Bylokhov wrote:
> Hi, Jay.
> The fix looks fine to me.
>
> On 05.10.15 13:17, Jayathirth D v wrote:
>> Hello All,
>>
>> _Please review following fix in jdk9:_
>>
>> _Bug:_ https://bugs.openjdk.java.net/browse/JDK-8066904/
>>
>> _Webrev:_
>> <http://cr.openjdk.java.net/%7Erchamyal/jay/8066904/webrev.00/>http://cr.openjdk.java.net/~rchamyal/jay/8066904/webrev.00/
>>
>>
>> _Bug:_ NullPointerException when calling ImageIO.read(InputStream) with
>> corrupt BMP
>>
>> _Root cause:_ Bits per pixel is zero in BMP header and because of which
>> sampleModel & colorModel are set to null in readHeader() of
>> BMPImageReader.java. This is causing "bdata" to be null in
>> read(imageIndex, ImageReadParam) which is referenced later.
>>
>> _Solution:_ Bits per pixel cant be zero for BI_RGB compression type(no
>> compression). Cases where Bits per pixel is not supported needs to be
>> handled properly. So caught exceptions at relevant places.
>>
>> Thanks,
>> Jay
>
>
More information about the 2d-dev
mailing list