mrglavas    2004/01/29 11:21:53

  Modified:    java/src/org/apache/xerces/xinclude XIncludeHandler.java
  Log:
  Fixing Bug #26472:
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26472
  
  We cannot assume that fSawFallback, fSawInclude and 
  fState are the same length. Their sizes are not synched
  so it's possible on reset that we would throw an AIOOBE.
  
  Revision  Changes    Path
  1.20      +12 -4     
xml-xerces/java/src/org/apache/xerces/xinclude/XIncludeHandler.java
  
  Index: XIncludeHandler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/xinclude/XIncludeHandler.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- XIncludeHandler.java      22 Jan 2004 16:08:58 -0000      1.19
  +++ XIncludeHandler.java      29 Jan 2004 19:21:53 -0000      1.20
  @@ -342,12 +342,20 @@
           literalSystemID.clear();
           expandedSystemID.clear();
   
  +        // REVISIT: Find a better method for maintaining
  +        // the state of the XInclude processor. These arrays
  +        // can potentially grow quite large. Cleaning them
  +        // out on reset may be very time consuming. -- mrglavas
  +        //
           // clear the previous settings from the arrays
  -        for (int i = 0; i < fState.length; i++) {
  -            // these three arrays will always be the same length, so this is safe
  +        for (int i = 0; i < fState.length; ++i) {          
  +            fState[i] = STATE_NORMAL_PROCESSING;
  +        }
  +        for (int i = 0; i < fSawFallback.length; ++i) {
               fSawFallback[i] = false;
  +        }
  +        for (int i = 0; i < fSawInclude.length; ++i) {
               fSawInclude[i] = false;
  -            fState[i] = STATE_NORMAL_PROCESSING;
           }
   
           try {
  
  
  

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

Reply via email to