]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
core: fix crash when running with apr lib build with APR_POOL_DEBUG.
authorRainer Jung <rjung@apache.org>
Mon, 22 Jul 2019 19:28:14 +0000 (19:28 +0000)
committerRainer Jung <rjung@apache.org>
Mon, 22 Jul 2019 19:28:14 +0000 (19:28 +0000)
Observed with huge config and mod_security using long config lines.

Backport of r1863179 from trunk.
Proposed by: rjung
Backported by: rjung
Reviewed by: rjung, icing, jim

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

STATUS
server/util.c

diff --git a/STATUS b/STATUS
index 19220eccb23fe09324d88637cb780d9378b08741..d4bff2788f07fac47d09c8b5cd24025e1da47902 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -143,13 +143,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
         https://svn.apache.org/repos/asf/httpd/httpd/patches/2.4.x/ssl-certicate-hooks.patch 
      +1: icing, jorton, jim
 
-  *) core: fix crash when running with apr lib build with APR_POOL_DEBUG.
-     Observed with huge config and mod_security using long config lines.
-     trunk:
-        http://svn.apache.org/r1863179
-     2.4.x patch: svn merge -c 1863179 ^/httpd/httpd/trunk .
-     +1: rjung, icing, jim
-
   *) mod_proxy_hcheck: mod_proxy_hcheck: mute "run from watchdog" message.
      This is way too verbose (every 100ms) to be logged at any LogLevel.
      CHANGES suggestion:
index 5cdd71d5683912ec73a8ac9cc21bf5d4d3a668a1..59027917c0ce84ca7c9014652e0bae1ad95a5be6 100644 (file)
@@ -2902,6 +2902,11 @@ AP_DECLARE(void) ap_varbuf_grow(struct ap_varbuf *vb, apr_size_t new_len)
     /* The required block is rather larger. Use allocator directly so that
      * the memory can be freed independently from the pool. */
     allocator = apr_pool_allocator_get(vb->pool);
+    /* Happens if APR was compiled with APR_POOL_DEBUG */
+    if (allocator == NULL) {
+        apr_allocator_create(&allocator);
+        ap_assert(allocator != NULL);
+    }
     if (new_len <= VARBUF_MAX_SIZE)
         new_node = apr_allocator_alloc(allocator,
                                        new_len + APR_ALIGN_DEFAULT(sizeof(*new_info)));