You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bo...@apache.org on 2008/07/29 00:06:06 UTC
svn commit: r680529 - /apr/apr-util/branches/1.3.x/misc/apr_reslist.c
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;
}