1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

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
This commit is contained in:
Graham Leggett
2004-10-03 16:24:53 +00:00
parent 111edd2b76
commit 74fd534f2b
2 changed files with 8 additions and 2 deletions

View 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;