]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r639465 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Tue, 27 May 2008 16:00:11 +0000 (16:00 +0000)
committerRuediger Pluem <rpluem@apache.org>
Tue, 27 May 2008 16:00:11 +0000 (16:00 +0000)
* Initialize hash needed by ap_register_rewrite_mapfunc early enough.

PR: 44641
Submitted by: Daniel Lescohier <daniel.lescohier cnet.com>
Reviewed by: rpluem, niq, wrowe, jim

Submitted by: rpluem
Reviewed by: rpluem, niq, trawick

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@660572 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/mappers/mod_rewrite.c

diff --git a/CHANGES b/CHANGES
index c221533832a462c98b445d24603d27fbfde524df..8f28b8eb5eb5a392b5286ba56c310e963d6fbf12 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.9
 
+  *) mod_rewrite: Initialize hash needed by ap_register_rewrite_mapfunc early
+     enough. PR 44641 [Daniel Lescohier <daniel.lescohier cnet.com>]
+
   *) mod_dav: Return "method not allowed" if the destination URI of a WebDAV
      copy / move operation is no DAV resource. PR 44734 [Ruediger Pluem]
 
diff --git a/STATUS b/STATUS
index a24583968700be52942919c10fd22afe29d5eaaf..026a16aff3ed6e10060b61165e145e3ebd1abccb 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -134,14 +134,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
        http://people.apache.org/~fielding/p/ab-sync.txt
   +1: fielding, jim, wrowe
 
- * mod_rewrite: Initialize hash needed by ap_register_rewrite_mapfunc early
-   enough. PR 44641
-   Trunk version of patch:
-         http://svn.apache.org/viewvc?rev=639465&view=rev
-   Backport version for 2.2.x of patch:
-         Trunk version of patch works
-   +1: rpluem, niq, trawick
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index ed2f5323e94e2a874570f0d26070feefca0fe6d1..72860d9586e4826678ca5dfec7c0cfdd8a29876a 100644 (file)
@@ -4055,7 +4055,6 @@ static int pre_config(apr_pool_t *pconf,
     APR_OPTIONAL_FN_TYPE(ap_register_rewrite_mapfunc) *map_pfn_register;
 
     /* register int: rewritemap handlers */
-    mapfunc_hash = apr_hash_make(pconf);
     map_pfn_register = APR_RETRIEVE_OPTIONAL_FN(ap_register_rewrite_mapfunc);
     if (map_pfn_register) {
         map_pfn_register("tolower", rewrite_mapfunc_tolower);
@@ -4854,6 +4853,10 @@ static void register_hooks(apr_pool_t *p)
      */
     static const char * const aszPre[]={ "mod_proxy.c", NULL };
 
+    /* make the hashtable before registering the function, so that
+     * other modules are prevented from accessing uninitialized memory.
+     */
+    mapfunc_hash = apr_hash_make(p);
     APR_REGISTER_OPTIONAL_FN(ap_register_rewrite_mapfunc);
 
     ap_hook_handler(handler_redirect, NULL, NULL, APR_HOOK_MIDDLE);