[
https://issues.apache.org/jira/browse/XERCESJ-1768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17912866#comment-17912866
]
Elliotte Rusty Harold commented on XERCESJ-1768:
------------------------------------------------
This is going to be hard to debug without a reproducer, but "
java.lang.ArrayIndexOutOfBoundsException: Index 8192 out of bounds for length
8192" screams that we have a fencepost error near here. Either off by one or a
<= that should be a <, something like that. Maybe we can find the bug by
inspection.
Tangentially related:
https://www.semanticscholar.org/paper/Obscuring-XML-Harold/561800910d98dd9c0290b8b9b7ece04247db196b
seems to have gone offline from the original site. Let me see if I can dig up
a copy. Ah, here it is:
https://www.ibiblio.org/xml//slides/extreme/randomizer/Randomizing_XML.html
> ArrayIndexOutOfBoundsException when parsing a file
> --------------------------------------------------
>
> Key: XERCESJ-1768
> URL: https://issues.apache.org/jira/browse/XERCESJ-1768
> Project: Xerces2-J
> Issue Type: Bug
> Components: SAX
> Affects Versions: 2.12.2
> Environment: Windows / jdk-17.0.13.11
> Reporter: Julien De Murcia
> Priority: Major
>
> I am using Apache Xerces v2.12.2 (packaged with jdk-17.0.13.11-hotspot from
> Eclipse Temurin on Windows) to parse an XML file with SAX.
> On one particular xml file, I get this exception :
> java.lang.ArrayIndexOutOfBoundsException: Index 8192 out of bounds for length
> 8192
> at
> java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces(XMLEntityScanner.java:1503)
> ~[?:?]
> at
> java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$TrailingMiscDriver.next(XMLDocumentScannerImpl.java:1374)
> ~[?:?]
> at
> java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
> ~[?:?]
> at
> java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:542)
> ~[?:?]
> at
> java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:889)
> ~[?:?]
> at
> java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:825)
> ~[?:?]
> at
> java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
> ~[?:?]
> at
> java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224)
> ~[?:?]
> at
> java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:637)
> ~[?:?]
>
> So far the exception only occured with one particular file. Unfortunately it
> is confidential so I cannot share it. The file size is 200 Mb (rather a small
> file according to our standards).
> If I remove a large part at the begining of the file, it is parsed without
> error. And the same goes if I remove a large part at the end of the file, so
> it does not seem caused by a single line of the xml.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]