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 2011/01/03 17:48:09 UTC

DO NOT REPLY [Bug 50539] New: Error reading in a vml file with unmatched

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

           Summary: Error reading in a vml file with unmatched <br>
           Product: POI
           Version: 3.7
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: jwalters@computer.org


Created an attachment (id=26454)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26454)
VML file illustrating the problem

In the EvilUnclosedBRFixingInputStream.java file, it does not properly handle a
case where there is a <br> in the overflow part of the buffer. It throws a
NegativeArraySizeException.

The fixup function needs to not process <br> tags past the end of the shortened
buffer, and when returning the spare bytes it needs to run fixup.

You can process the attached VML file through the
EvilUnclosedBRFixingInputStream to reproduce the exception.

-- 
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 50539] Error reading in a vml file with unmatched

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

--- Comment #1 from Jay Walters <jw...@computer.org> 2011-01-03 16:13:19 EST ---
Created an attachment (id=26456)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26456)
Patch to resolve the issue and unit test the fix

Includes the changes to EvilUnclosedBRFixingInputStream and to its unit test to
verify the problem is resolved.

-- 
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 50539] Error reading in a vml file with unmatched

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

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

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

--- Comment #2 from Nick Burch <ni...@alfresco.com> 2011-02-04 11:44:00 EST ---
Thanks for the patch and unit test

After some pondering, I decided to refactor the class and fix a bit to make it
clearer what is going on. I tweaked the test to try a wide range of buffer
sizes, to simulate all the different cases of the br in the overflow, and it
now passes all of them.

Fix committed in r1067217.

-- 
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