struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tur...@apache.org
Subject cvs commit: jakarta-struts/src/share/org/apache/struts/upload MultipartIterator.java
Date Tue, 13 May 2003 16:09:23 GMT
turner      2003/05/13 09:09:22

  Modified:    src/share/org/apache/struts/upload MultipartIterator.java
  Log:
  Add check against -1 to maxSize as per bug 19835
  
  Thanks to lifangning@huawei.com for the fix.
  
  Revision  Changes    Path
  1.23      +4 -4      jakarta-struts/src/share/org/apache/struts/upload/MultipartIterator.java
  
  Index: MultipartIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/upload/MultipartIterator.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- MultipartIterator.java	8 Dec 2002 07:12:16 -0000	1.22
  +++ MultipartIterator.java	13 May 2003 16:09:22 -0000	1.23
  @@ -251,7 +251,7 @@
           //don't let the stream read past the content length
           this.inputStream.setMaxLength(this.contentLength+1);
           //just stop now if the content length is bigger than the maximum allowed size
  -        if (this.contentLength > this.maxSize)
  +        if ((this.maxSize > -1) && (this.contentLength > this.maxSize))
           {
               this.maxLengthExceeded = true;
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message