]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1921067 from trunk:
authorJoe Orton <jorton@apache.org>
Mon, 20 Jan 2025 10:24:13 +0000 (10:24 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 20 Jan 2025 10:24:13 +0000 (10:24 +0000)
* Take care for the case where nkey is NULL

PR: 69358
Reported by: <zhora.budyukin111 gmail.com>
Submitted by: rpluem
Reviewed by: jailletc36, rjung, jorton

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

CHANGES
modules/cache/mod_cache_socache.c

diff --git a/CHANGES b/CHANGES
index 14cd5f2f14ab2e1e9392c0cf7204acffbde8ed40..6f572d2976b29d2699ce341ec2c9f29d2acfb33d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.63
 
+  *) mod_cache_socache: Fix possible crash on error path. PR 69358.
+     [Ruediger Pluem]
+
   *) mod_md: update to version 2.4.31
      - Improved error reporting when waiting for ACME server to verify domains
        or finalizing the order fails, e.g. times out.
index 5f9e1d6c66181459c5a6172633979aa6b3a642ed..38f1bfb27938715aac12ff32d3dbbf0eb443f528 100644 (file)
@@ -700,9 +700,11 @@ fail:
             return DECLINED;
         }
     }
-    conf->provider->socache_provider->remove(
-            conf->provider->socache_instance, r->server,
-            (unsigned char *) nkey, strlen(nkey), r->pool);
+    if (nkey) {
+        conf->provider->socache_provider->remove(
+                conf->provider->socache_instance, r->server,
+                (unsigned char *) nkey, strlen(nkey), r->pool);
+    }
     if (socache_mutex) {
         apr_status_t status = apr_global_mutex_unlock(socache_mutex);
         if (status != APR_SUCCESS) {