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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user