Return-Path: Delivered-To: apmail-jakarta-struts-dev-archive@apache.org Received: (qmail 61046 invoked from network); 13 May 2003 16:09:50 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 13 May 2003 16:09:50 -0000 Received: (qmail 14828 invoked by uid 97); 13 May 2003 16:11:56 -0000 Delivered-To: qmlist-jakarta-archive-struts-dev@nagoya.betaversion.org Received: (qmail 14819 invoked from network); 13 May 2003 16:11:56 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 13 May 2003 16:11:56 -0000 Received: (qmail 59124 invoked by uid 500); 13 May 2003 16:09:26 -0000 Mailing-List: contact struts-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list struts-dev@jakarta.apache.org Received: (qmail 59062 invoked by uid 500); 13 May 2003 16:09:25 -0000 Received: (qmail 59015 invoked from network); 13 May 2003 16:09:24 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 13 May 2003 16:09:24 -0000 Received: (qmail 13581 invoked by uid 1573); 13 May 2003 16:09:23 -0000 Date: 13 May 2003 16:09:23 -0000 Message-ID: <20030513160923.13580.qmail@icarus.apache.org> From: turner@apache.org To: jakarta-struts-cvs@apache.org Subject: cvs commit: jakarta-struts/src/share/org/apache/struts/upload MultipartIterator.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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