You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mo...@apache.org on 2001/10/16 12:46:56 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/runtime TextOutput.java

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:	morten@xml.apache.org
  Reviewed by:	morten@xml.apache.org
  
  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: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org