ASF Bugzilla – Attachment 28131 Details for
Bug 52446
BufferUnderlowException in NPropertyTable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
The patch with my workaround
poi-npropertytable.patch (text/plain), 1.04 KB, created by
Antoni Mylka
on 2012-01-10 15:18:17 UTC
(
hide
)
Description:
The patch with my workaround
Filename:
MIME Type:
Creator:
Antoni Mylka
Created:
2012-01-10 15:18:17 UTC
Size:
1.04 KB
patch
obsolete
>Index: src/java/org/apache/poi/poifs/property/NPropertyTable.java >=================================================================== >--- src/java/org/apache/poi/poifs/property/NPropertyTable.java (revision 1229559) >+++ src/java/org/apache/poi/poifs/property/NPropertyTable.java (working copy) >@@ -89,7 +89,15 @@ > bb.array().length == bigBlockSize.getBigBlockSize()) { > data = bb.array(); > } else { >- data = new byte[bigBlockSize.getBigBlockSize()]; >+ /* >+ * This was originally bigBlockSize.getBigBlockSize(). >+ * A user reported a file, where the buffer would contain less >+ * bytes. The file was corrupted, yet this hack allowed it >+ * to be processed correctly. >+ */ >+ int dataSize = bigBlockSize.getBigBlockSize() <= bb.remaining() ? >+ bigBlockSize.getBigBlockSize() : bb.remaining(); >+ data = new byte[dataSize]; > bb.get(data, 0, data.length); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 52446
: 28131