Commit 41353eac authored by Bradley Nicholes's avatar Bradley Nicholes
Browse files

Fix the re-linking issue that was causing a segfault when purging elements from the LDAP cache.

PR 24801

submitted by: [Jess Holle <jessh ptc.com>]
reviewed by: minfrin, bnicholes, clar


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@105343 13f79535-47bb-0310-9956-ffa450edef68
parent 71fc30ff
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
Changes with Apache 2.0.53
  *) Fix the re-linking issue when purging elements from the LDAP cache
     PR 24801 [Jess Holle <jessh ptc.com>]
      
  *) mod_disk_cache: Fix races in saving responses.  [Justin Erenkrantz]
  *) Fix Expires handling in mod_cache.  [Justin Erenkrantz]
+1 −9
Original line number Diff line number Diff line
APACHE 2.0 STATUS:                                              -*-text-*-
Last modified at [$Date: 2004/09/28 22:32:06 $]
Last modified at [$Date: 2004/09/29 17:22:50 $]

Release:

@@ -89,14 +89,6 @@ PATCHES TO BACKPORT FROM 2.1
       modules/experimental/mod_disk_cache.c: 1.61
       +1: jerenkrantz, stoddard

    *) Fix a segfault in the LDAP cache purge. PR 24801
         modules/ldap/util_ldap_cache_mgr.c: 1.9, 1.10
       +1: minfrin, bnicholes, clar
       bnicholes - backporting modules/ldap/util_ldap_cache_mgr.c: r1.7 below
	    should eliminate the need to backport the "else" condition included
	    in this patch.
       minfrin: The excess "else" condition has been removed in v1.10.

    *) mod_rewrite: Fix 0 bytes write into random memory position. PR 31036.
       (2.0 + 1.3)
         http://www.apache.org/~nd/dbmmap_1.3.patch
+9 −4
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ unsigned long util_ald_hash_string(int nstr, ...)
void util_ald_cache_purge(util_ald_cache_t *cache)
{
    unsigned long i;
    util_cache_node_t *p, *q;
    util_cache_node_t *p, *q, **pp;
    apr_time_t t;

    if (!cache)
@@ -184,7 +184,8 @@ void util_ald_cache_purge(util_ald_cache_t *cache)
    cache->numpurges++;

    for (i=0; i < cache->size; ++i) {
        p = cache->nodes[i];
        pp = cache->nodes + i;
        p = *pp;
        while (p != NULL) {
            if (p->add_time < cache->marktime) {
                q = p->next;
@@ -192,10 +193,11 @@ void util_ald_cache_purge(util_ald_cache_t *cache)
                util_ald_free(cache, p);
                cache->numentries--;
                cache->npurged++;
                p = q;
                p = *pp = q;
            }
            else {
                p = p->next;
                pp = &(p->next);
                p = *pp;
            }
        }
    }
@@ -688,6 +690,9 @@ char *util_ald_cache_display(request_rec *r, util_ldap_state_t *st)
            }

        }
        else {
            buf = "";
        }
    }
    else {
        ap_rputs("<p>\n"