seguin      01/06/18 20:15:34

  Modified:    jk/java/org/apache/ajp Ajp13Packet.java
  Log:
  psuedo-fix for bug 1528.
  
  it would be better if when buffer overflow is detected, and exception is thrown,
  rather than printing a message and letting an error be thrown.
  
  Revision  Changes    Path
  1.7       +1 -1      
jakarta-tomcat-connectors/jk/java/org/apache/ajp/Ajp13Packet.java
  
  Index: Ajp13Packet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/Ajp13Packet.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Ajp13Packet.java  2001/06/08 19:49:51     1.6
  +++ Ajp13Packet.java  2001/06/19 03:15:32     1.7
  @@ -304,7 +304,7 @@
        */
       public void appendBytes( byte b[], int off, int numBytes ) {
           appendInt( numBytes );
  -        if( pos + numBytes > buff.length ) {
  +        if( pos + numBytes >= buff.length ) {
               System.out.println("Buffer overflow " + buff.length + " " + pos + " " + 
numBytes );
               // XXX Log
           }
  
  
  

Reply via email to