Commit 17223f80 authored by Graham Leggett's avatar Graham Leggett
Browse files

mod_ldap: prevent the possiblity of an infinite loop in the LDAP

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
parent ecedd217
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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
+5 −2
Original line number Diff line number Diff line
@@ -469,10 +469,13 @@ 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)
            for (n = cache->nodes[i];
                 n != NULL && n != n->next;
                 n = n->next) {
            	totchainlen++;
            }
        }
    }
    chainlen = nchains? (double)totchainlen / (double)nchains : 0;

    if (id) {