diff options
author | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-28 21:31:47 +0000 |
---|---|---|
committer | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-28 21:31:47 +0000 |
commit | f176858ce0ed2ea55701303e5c0c57dcef3fc9c1 (patch) | |
tree | be803cf375c37e948c313d461538b89d54b7c46f | |
parent | 2d67b291fe51fb2b60ddc19f6507fa12c696738a (diff) | |
download | libapr-util-f176858ce0ed2ea55701303e5c0c57dcef3fc9c1.tar.gz |
Better enforce reslist limits.
Values cannot be negative and hmax must not be zero.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@680511 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | misc/apr_reslist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/misc/apr_reslist.c b/misc/apr_reslist.c index 1c571d41..a3a68a59 100644 --- a/misc/apr_reslist.c +++ b/misc/apr_reslist.c @@ -245,7 +245,8 @@ APU_DECLARE(apr_status_t) apr_reslist_create(apr_reslist_t **reslist, /* 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; } |