]> 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>
Sun, 3 Oct 2004 16:24:53 +0000 (16:24 +0000)
committerGraham Leggett <minfrin@apache.org>
Sun, 3 Oct 2004 16:24:53 +0000 (16:24 +0000)
statistics display.
PR: 29216
Obtained from:
Submitted by: Graham Leggett
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105373 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/ldap/util_ldap_cache_mgr.c

diff --git a/CHANGES b/CHANGES
index a751e4219b1acda1ab9a86a0251af0bdbcf715eb..ccff568a693e3483257c14754646b974fd1e0004 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) mod_ldap: prevent the possiblity of an infinite loop in the LDAP
+     statistics display. PR 29216 [Graham Leggett]
+
   *) mod_disk_cache: Do not store hop-by-hop headers.  [Justin Erenkrantz]
 
   *) mod_cache: Try to correctly follow RFC 2616 13.3 on validating stale
index a46bcc9316193a7d36f7997fc936819c5f55053f..f9a74429c42d9ce5f2a9b428c514438b1382e760 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;