You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/04/15 04:24:47 UTC

DO NOT REPLY [Bug 44824] New: [PATCH] Infinite loop in hwpf/usermodel/ Picture.java

https://issues.apache.org/bugzilla/show_bug.cgi?id=44824

           Summary: [PATCH] Infinite loop in hwpf/usermodel/Picture.java
           Product: POI
           Version: 3.0-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P2
         Component: HWPF
        AssignedTo: dev@poi.apache.org
        ReportedBy: flester@gmail.com
                CC: flester@gmail.com


hwpf/usermodel/Picture.java has an infinite loop in getting the JPEG height and
width. This patch fixes the loop to not be infinite. The infinite loop is not 
normally triggered, only when the first byte of the image is not as expected.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44824] [PATCH] Infinite loop in hwpf/usermodel/Picture. java

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44824


Nick Burch <ni...@torchbox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




--- Comment #1 from Nick Burch <ni...@torchbox.com>  2008-04-27 11:05:18 PST ---
There doesn't seem to be any patch associated with this bug :(

Any chance you could upload the patch, and also a .doc file that shows up the
problem? That way, we can knock up a unit test for this too, and make sure we
don't break it again in the future


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44824] [PATCH] Infinite loop in hwpf/usermodel/Picture. java

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44824





--- Comment #2 from Mike Flester <fl...@gmail.com>  2008-04-27 12:53:50 PST ---
Created an attachment (id=21860)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21860)
patch for infinite loop in Picture.java

Sorry about the missing patch, thought I had uploaded it before but I guess
not.
The only document I have to demonstrate this is proprietary content, but 
hopefully once you see the one line patch you'll agree that it is an easy call.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44824] [PATCH] Infinite loop in hwpf/usermodel/Picture. java

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44824


Nick Burch <ni...@torchbox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #3 from Nick Burch <ni...@torchbox.com>  2008-05-20 08:47:57 PST ---
I've updated Picture.java to skip on two bytes at a time, until it finds what
it wants. This should avoid the loop.

However, there's no unit test for this, so it might potentially get broken
again in the future. So, if you do find a file that triggers this, which you
can upload for us to test against, that'd be great!


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org