sboag       2003/04/23 15:35:48

  Modified:    java/src/org/apache/xml/dtm/ref DTMDefaultBase.java
  Log:
  Fix for array out of bounds exception in findNamespaceContext, where the 
index was allowed to go to -1.  This is a blind fix, and someone who knows the 
code better should take a look to see what they think.
  
  Revision  Changes    Path
  1.36      +3 -1      
xml-xalan/java/src/org/apache/xml/dtm/ref/DTMDefaultBase.java
  
  Index: DTMDefaultBase.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMDefaultBase.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- DTMDefaultBase.java       3 Apr 2003 19:18:16 -0000       1.35
  +++ DTMDefaultBase.java       23 Apr 2003 22:35:48 -0000      1.36
  @@ -1425,10 +1425,12 @@
                   do {
                     ancestor=_parent(ancestor);
                   } while (candidate < ancestor);
  -            } else {
  +            } else if(wouldBeAt > 0){
                 // Too late in list
                 candidate=m_namespaceDeclSetElements.elementAt(--wouldBeAt);
               }
  +            else
  +             break;
             }
         }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to