commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno P. Kinoshita (JIRA)" <>
Subject [jira] [Created] (IMAGING-220) JpegDecoder takes a long time (+10s) to decode a bad JPEG
Date Wed, 02 Jan 2019 08:00:00 GMT
Bruno P. Kinoshita created IMAGING-220:

             Summary: JpegDecoder takes a long time (+10s) to decode a bad JPEG
                 Key: IMAGING-220
             Project: Commons Imaging
          Issue Type: Bug
            Reporter: Bruno P. Kinoshita
            Assignee: Bruno P. Kinoshita
             Fix For: 1.0
         Attachments: timeout-48eb4251935b4ca8b26d1859ea525c1b42ae0c78

Debugging the code I suspected there was something weird, as it would stay a long time in
the while look as a += operation had no effect. Then looked up for the extend and section

The extend method in the JpegDecoder is using a while instead of an if. If you look at the
specification, it is not clear whether it is an if or while, but it looks to me like it is
a simple if condition.

Furthermore, if you look at the following examples, it is possible to confirm others implemented
the bit extension method with a simple if.
 * []
 * []

This does not occur in Sanselan as there is JpegDecoder and no extend method as well. Attaching
example file that takes over 10 seconds to be processed (up to the point where the decoder
throws an exception actually).

This message was sent by Atlassian JIRA

View raw message