Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 79838 invoked from network); 28 Jul 2008 21:32:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Jul 2008 21:32:09 -0000 Received: (qmail 39939 invoked by uid 500); 28 Jul 2008 21:32:09 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 39888 invoked by uid 500); 28 Jul 2008 21:32:09 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 39879 invoked by uid 99); 28 Jul 2008 21:32:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jul 2008 14:32:08 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jul 2008 21:31:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B731323889FC; Mon, 28 Jul 2008 14:31:48 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r680511 - /apr/apr-util/trunk/misc/apr_reslist.c Date: Mon, 28 Jul 2008 21:31:48 -0000 To: commits@apr.apache.org From: bojan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080728213148.B731323889FC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bojan Date: Mon Jul 28 14:31:47 2008 New Revision: 680511 URL: http://svn.apache.org/viewvc?rev=680511&view=rev Log: Better enforce reslist limits. Values cannot be negative and hmax must not be zero. Modified: apr/apr-util/trunk/misc/apr_reslist.c Modified: apr/apr-util/trunk/misc/apr_reslist.c URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/misc/apr_reslist.c?rev=680511&r1=680510&r2=680511&view=diff ============================================================================== --- apr/apr-util/trunk/misc/apr_reslist.c (original) +++ apr/apr-util/trunk/misc/apr_reslist.c Mon Jul 28 14:31:47 2008 @@ -245,7 +245,8 @@ /* Do some sanity checks so we don't thrash around in the * maintenance routine later. */ - if (min > smax || min > hmax || smax > hmax || ttl < 0) { + if (min < 0 || min > smax || min > hmax || smax > hmax || hmax == 0 || + ttl < 0) { return APR_EINVAL; }