You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by an...@locus.apache.org on 2000/01/07 01:15:50 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/dom DeferredDocumentImpl.java
andyc 00/01/06 16:15:49
Modified: java/src/org/apache/xerces/dom DeferredDocumentImpl.java
Log:
Off by one error caused an index out of bounds exception to
be thrown when the number of identifiers reached 64. The
code throwing the exception was checking to make sure that
the current element didn't have more identifiers but its
bound check was off by one.
This defect only affected the deferred dom mode of the
parser.
Thanks to John Flight <jf...@impresse.com> for the catch.
Revision Changes Path
1.5 +1 -1 xml-xerces/java/src/org/apache/xerces/dom/DeferredDocumentImpl.java
Index: DeferredDocumentImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DeferredDocumentImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DeferredDocumentImpl.java 2000/01/05 01:34:47 1.4
+++ DeferredDocumentImpl.java 2000/01/07 00:15:49 1.5
@@ -831,7 +831,7 @@
// continue if there are more IDs for
// this element
- if (idIndex < fIdCount &&
+ if (idIndex + 1 < fIdCount &&
fIdElement[idIndex + 1] == nodeIndex) {
idIndex++;
}