]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_ldap: prevent the possiblity of an infinite loop in the LDAP
authorGraham Leggett <minfrin@apache.org>
Wed, 13 Oct 2004 16:19:36 +0000 (16:19 +0000)
committerGraham Leggett <minfrin@apache.org>
Wed, 13 Oct 2004 16:19:36 +0000 (16:19 +0000)
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

CHANGES
STATUS
modules/experimental/util_ldap_cache_mgr.c

diff --git a/CHANGES b/CHANGES
index b524417f607a266d34c2d57f4595c9e83cbf4bf1..8ac88a34e93542e3677eef079920793afe71fa22 100644 (file)
--- 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 67a31f7aa4bd0da4f711ae241263a54b7e1024a8..e6d4f1ca6c77ed2324397220104d020faca8afb1 100644 (file)
--- 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
index 20b5ceac44f738df878b82cd524485e42edb52b4..10445021d2e12e9793cb239a93ff65b0af2e45d3 100644 (file)
@@ -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;