You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2005/11/24 22:30:41 UTC

svn commit: r348807 - /xerces/java/trunk/src/org/apache/xerces/impl/dtd/BalancedDTDGrammar.java

Author: mrglavas
Date: Thu Nov 24 13:30:39 2005
New Revision: 348807

URL: http://svn.apache.org/viewcvs?rev=348807&view=rev
Log:
Fixing a StackOverflowError which can occur when an element type declaration has mixed content.

Modified:
    xerces/java/trunk/src/org/apache/xerces/impl/dtd/BalancedDTDGrammar.java

Modified: xerces/java/trunk/src/org/apache/xerces/impl/dtd/BalancedDTDGrammar.java
URL: http://svn.apache.org/viewcvs/xerces/java/trunk/src/org/apache/xerces/impl/dtd/BalancedDTDGrammar.java?rev=348807&r1=348806&r2=348807&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/dtd/BalancedDTDGrammar.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/dtd/BalancedDTDGrammar.java Thu Nov 24 13:30:39 2005
@@ -186,7 +186,8 @@
      * @throws XNIException Thrown by handler to signal an error.
      */
     public final void endGroup(Augmentations augs) throws XNIException {
-        final int group = addContentSpecNodes(0, fGroupIndexStackSizes[fDepth] - 1);
+        final int group = fGroupIndexStackSizes[fDepth] > 0 ? 
+                addContentSpecNodes(0, fGroupIndexStackSizes[fDepth] - 1) : addUniqueLeafNode(null);
         --fDepth;
         addToCurrentGroup(group);
     } // endGroup()



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org