Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
2.7.1, 2.9.1
-
None
-
None
-
None
Description
Under some rare circumstances you get an ArrayIndexOutOfBoundsException in Xerces. This is the case if the Reader you give with the SaxParser.parse-Method returns 0 for the method public int read(char[] cbuf, int off, int len)
This can lead to that exception.
Apparently Xerces reads in the XML in chunks of 2048 bytes. If the last read(..) call returns 2048 filled bytes, and the following read returns 0 (although it should return -1) this exception occurs. You should prevent this by accepting 0 as valid return of read, although it does not indicate, that the end of file has been reached.