morten      01/10/16 03:46:56

  Modified:    java/src/org/apache/xalan/xsltc/runtime TextOutput.java
  Log:
  Added code to prevent index-out-of-bounds exception in the output handler.
  PR:           none
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.38      +4 -2      
xml-xalan/java/src/org/apache/xalan/xsltc/runtime/TextOutput.java
  
  Index: TextOutput.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/TextOutput.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- TextOutput.java   2001/10/15 09:13:23     1.37
  +++ TextOutput.java   2001/10/16 10:46:56     1.38
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: TextOutput.java,v 1.37 2001/10/15 09:13:23 morten Exp $
  + * @(#)$Id: TextOutput.java,v 1.38 2001/10/16 10:46:56 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -368,8 +368,10 @@
       private void escapeCharacters(char[] ch, int off, int len)
        throws SAXException {
   
  -     final int limit = off + len;
  +     int limit = off + len;
        int offset = off;
  +
  +     if (limit > ch.length) limit = ch.length;;
   
        // Step through characters and escape all special characters
        for (int i = off; i < limit; i++) {
  
  
  

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

Reply via email to