You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/01/02 04:46:00 UTC

[jira] [Work logged] (IMAGING-219) Imaging gets stuck parsing a RGBE input file

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

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

                Author: ASF GitHub Bot
            Created on: 02/Jan/19 04:45
            Start Date: 02/Jan/19 04:45
    Worklog Time Spent: 10m 
      Work Description: kinow commented on pull request #39: IMAGING-219: prevent infinite loop when decompressing RGBE input file
URL: https://github.com/apache/commons-imaging/pull/39
 
 
   The `decompress` method has an input stream. It compares if the value returned by `.read()` is greater than 128, otherwise tries to sum up a variable up to the value returned.
   
   However, the input stream may return `-1`, causing it to loop infinitely. This does not happen in Sanselan as there is no such format/parser doing any decompression with RGBE.
   
   Added an input file that fails, as well as a new unit test to confirm it is working. As the problem involves the code getting stuck, and we don't want the same to happen to our tests, by precaution added a timeout of 2 seconds in the test as well.
   
   Will merge in a few days if there is no objections here.
   
   Cheers
   Bruno
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

            Worklog Id:     (was: 180022)
            Time Spent: 10m
    Remaining Estimate: 0h

> Imaging gets stuck parsing a RGBE input file
> --------------------------------------------
>
>                 Key: IMAGING-219
>                 URL: https://issues.apache.org/jira/browse/IMAGING-219
>             Project: Commons Imaging
>          Issue Type: Bug
>            Reporter: Bruno P. Kinoshita
>            Assignee: Bruno P. Kinoshita
>            Priority: Major
>             Fix For: 1.0
>
>         Attachments: timeout-9713502c9c371f1654b493650c16ab17c0444369
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Found by Guido Vranken. The input file attached results in an input reader returning -1 for the .read() method during the RGBE decompress stage.
> This causes the application to hang. This does not affect Sanselan, as there was no RGBE parser or visitor in that version.



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