apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r680529 - /apr/apr-util/branches/1.3.x/misc/apr_reslist.c
Date Mon, 28 Jul 2008 22:06:06 GMT
Author: bojan
Date: Mon Jul 28 15:06:05 2008
New Revision: 680529

URL: http://svn.apache.org/viewvc?rev=680529&view=rev
Log:
Backport r680511 from the trunk.
Better enforce reslist limits.
Values cannot be negative and hmax must not be zero.

Modified:
    apr/apr-util/branches/1.3.x/misc/apr_reslist.c

Modified: apr/apr-util/branches/1.3.x/misc/apr_reslist.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/misc/apr_reslist.c?rev=680529&r1=680528&r2=680529&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/misc/apr_reslist.c (original)
+++ apr/apr-util/branches/1.3.x/misc/apr_reslist.c Mon Jul 28 15:06:05 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;
     }
 



Mime
View raw message