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

Phil Persad <[email protected]> changed:

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

--- Comment #2 from Phil Persad <[email protected]> ---
Unfortunately, I'm working under some rather strong confidentiality constraints
and cannot provide you with the document which causes the error.

However, the current structure of the code is:
<allocate buffer>
<sanity check length>
<perform copy>

The structure:
<sanity check length>
<allocate buffer>
<perform copy>

Is clearly safer.  The fact that there is a sanity check in the existing code
acknowledges that unsafe behaviour is possible, in that case it makes a lot of
sense to perform buffer allocation afterwards.

It's also worth noting that an OutOfMemoryError is a catastrophic failure.  The
worst case for most exceptions thrown by the poi library is a failure to parse
a given document.  However, an OutOfMemoryError will generally take down the
entire application.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to