From: Graham Leggett Date: Wed, 13 Oct 2004 16:19:36 +0000 (+0000) Subject: mod_ldap: prevent the possiblity of an infinite loop in the LDAP X-Git-Tag: 2.0.53~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=881e42b248e8c2d83569130a2d87e372e57b1454;p=thirdparty%2Fapache%2Fhttpd.git mod_ldap: prevent the possiblity of an infinite loop in the LDAP statistics display. PR: 29216 Obtained from: Submitted by: Reviewed by: minfrin, bnicholes, jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@105428 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index b524417f607..8ac88a34e93 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.53 + *) mod_ldap: prevent the possiblity of an infinite loop in the LDAP + statistics display. PR 29216 [Graham Leggett] + *) mod_ldap: fix a bogus error message to tell the user which file is causing a potential problem with the LDAP shared memory cache. PR 31431 [Graham Leggett] diff --git a/STATUS b/STATUS index 67a31f7aa4b..e6d4f1ca6c7 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2004/10/13 15:29:44 $] +Last modified at [$Date: 2004/10/13 16:19:34 $] Release: @@ -103,12 +103,6 @@ PATCHES TO BACKPORT FROM 2.1 PR 24437 +1: minfrin - *) mod_ldap: prevent the possiblity of an infinite loop in the LDAP - statistics display. - modules/ldap/util_ldap_cache_mgr.c: 1.11 - PR 29216 - +1: minfrin, bnicholes, jim - *) apxs: fix handling of -Wc/-Wl and "-o mod_foo.so". http://cvs.apache.org/viewcvs.cgi/httpd-2.0/support/apxs.in?r1=1.62&r2=1.64 PR: 31448 diff --git a/modules/experimental/util_ldap_cache_mgr.c b/modules/experimental/util_ldap_cache_mgr.c index 20b5ceac44f..10445021d2e 100644 --- a/modules/experimental/util_ldap_cache_mgr.c +++ b/modules/experimental/util_ldap_cache_mgr.c @@ -469,8 +469,11 @@ char *util_ald_cache_display_stats(request_rec *r, util_ald_cache_t *cache, char for (i=0; i < cache->size; ++i) { if (cache->nodes[i] != NULL) { nchains++; - for (n = cache->nodes[i]; n != NULL; n = n->next) - totchainlen++; + for (n = cache->nodes[i]; + n != NULL && n != n->next; + n = n->next) { + totchainlen++; + } } } chainlen = nchains? (double)totchainlen / (double)nchains : 0;