https://bz.apache.org/bugzilla/show_bug.cgi?id=60626
Bug ID: 60626
Summary: ArrayIndexOutOfBoundsException in
EvilUnclosedBRFixingInputStream
Product: POI
Version: 3.16-dev
Hardware: PC
Status: NEW
Severity: blocker
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 34663
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34663&action=edit
VML file that causes the problem
I have an Excel file that can't be loaded. I found that
EvilUnclosedBRFixingInputStream has a problem with a VML file with was part of
my Excel file.
The following sample code reproduces the problem:
String xmlFile = "vmlDrawing3.vml";
byte[] data = Files.readAllBytes(Paths.get(xmlFile));
ByteArrayInputStream bis = new ByteArrayInputStream(data);
EvilUnclosedBRFixingInputStream is = new EvilUnclosedBRFixingInputStream(bis);
DocumentHelper.readDocument(is);
The following Exception is thrown, however not in all Operating Systems/JDK
Versions:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2048
at org.apache.xerces.impl.io.UTF8Reader.read(UTF8Reader.java:336)
at
org.apache.xerces.impl.XMLEntityScanner.load(XMLEntityScanner.java:1753)
at
org.apache.xerces.impl.XMLEntityScanner.scanLiteral(XMLEntityScanner.java:834)
at
org.apache.xerces.impl.XMLScanner.scanAttributeValue(XMLScanner.java:772)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(XMLNSDocumentScannerImpl.java:529)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:181)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
at
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:875)
at
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230)
at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:298)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
at
org.apache.poi.util.DocumentHelper.readDocument(DocumentHelper.java:137)
...
--
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]