[ 
https://issues.apache.org/jira/browse/IMAGING-211?focusedWorklogId=243049&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-243049
 ]

ASF GitHub Bot logged work on IMAGING-211:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/May/19 02:11
            Start Date: 16/May/19 02:11
    Worklog Time Spent: 10m 
      Work Description: coveralls commented on issue #42: IMAGING-211: Fix 
boolean logic to produce correct error for invalid PNG chunk size
URL: https://github.com/apache/commons-imaging/pull/42#issuecomment-492889458
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/23417869/badge)](https://coveralls.io/builds/23417869)
   
   Coverage increased (+0.006%) to 73.821% when pulling 
**f55035ac7fb451e85e3139c959a25f47f4ffd04a on kinow:IMAGING-211** into 
**55f7368822b9781d186024524c7cd08adb3a2f59 on apache:master**.
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 243049)
    Time Spent: 20m  (was: 10m)

> Imaging.getBufferedImage fails throwing 
> java.lang.ArrayIndexOutOfBoundsException for specific inputs -- 
> evintila-april_dynamics
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IMAGING-211
>                 URL: https://issues.apache.org/jira/browse/IMAGING-211
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: imaging.common.*
>    Affects Versions: 1.0-alpha1
>         Environment: Ubuntu 17.10
>            Reporter: Emanuel Vintila
>            Assignee: Bruno P. Kinoshita
>            Priority: Major
>              Labels: patch, security
>             Fix For: 1.0-alpha2
>
>         Attachments: testfile_2.png
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> For specific inputs, Imaging.getBufferedImage fails throwing 
> java.lang.ArrayIndexOutOfBoundsException: -99, instead of ImageReadException 
> or IOException. 
>  Example code that can be used to reproduce the problem, with "testfile_2" 
> found at this link 
> [testfile_2|https://drive.google.com/open?id=1Hu4VOWEJ2ARqAmDDhb9zT5kEbi-Ukrct]:
> {code:java}
> // evintila @ April Dynamics
> File file = new File("testfile_2");
> final Map<String, Object> params = new HashMap<>();
> params.put(ImagingConstants.BUFFERED_IMAGE_FACTORY,
> new ManagedImageBufferedImageFactory());
> try
> { // the problem is here: 
>     final BufferedImage image = Imaging.getBufferedImage(file, params); }
> catch (ImageReadException e)
> {
> } catch (IOException e)
> {
> }{code}
> Output:
> {noformat}
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -99
> at 
> org.apache.commons.imaging.formats.png.chunks.PngChunkIhdr.<init>(PngChunkIhdr.java:55)
> at 
> org.apache.commons.imaging.formats.png.PngImageParser.readChunks(PngImageParser.java:186)
> at 
> org.apache.commons.imaging.formats.png.PngImageParser.readChunks(PngImageParser.java:229)
> at 
> org.apache.commons.imaging.formats.png.PngImageParser.getBufferedImage(PngImageParser.java:494)
> at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1377)
> at 
> org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1365){noformat}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to