https://issues.apache.org/bugzilla/show_bug.cgi?id=51903
Bug #: 51903
Summary: [PATCH] RevisionMarkAuthorTable Illegal Length -1
getFromUnicodeLE
Product: POI
Version: 3.8-dev
Platform: PC
Status: NEW
Severity: major
Priority: P2
Component: HWPF
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 27618
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27618
Patch for issue
Sporadic bug with some Word files (unable to submit sample due to sensitive
nature of files).
The LittleEndian.getShort sometimes returns a length of -1, which causes a
failure in subsequent getFromUnicodeLE() call. Added a check for invalid
length before proceeding. Was last entry in my test file and having a null
entries array value does not appear to cause any additional errors down-stream.
Stack Trace (POI version 3.8-beta4)
Caused by: java.lang.IllegalArgumentException: Illegal length -1
at org.apache.poi.util.StringUtil.getFromUnicodeLE(StringUtil.java:73)
at
org.apache.poi.hwpf.model.RevisionMarkAuthorTable.<init>(RevisionMarkAuthorTable.java:89)
at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:375)
at
org.apache.tika.parser.microsoft.WordExtractor.parse(WordExtractor.java:67)
at
org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:196)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
... 45 more
--
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: [email protected]
For additional commands, e-mail: [email protected]