]> granicus.if.org Git - apache/commitdiff
mod_cache: Fix PR 15113, a core dump in cache_in_filter when
authorPaul J. Reder <rederpj@apache.org>
Tue, 17 Dec 2002 15:29:02 +0000 (15:29 +0000)
committerPaul J. Reder <rederpj@apache.org>
Tue, 17 Dec 2002 15:29:02 +0000 (15:29 +0000)
a redirect occurs. The code was passing a format string and
integer to apr_pstrcat. Changed to apr_psprintf. [Paul J. Reder]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97970 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/experimental/mod_cache.c

diff --git a/CHANGES b/CHANGES
index c54a717631f2b7d1761f9c2c4413d051b8c2cf7f..01f89d28f176822a37b354b418dc0eb874f3ab83 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,11 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) mod_cache: Fix PR 15113, a core dump in cache_in_filter when
+     a redirect occurs. The code was passing a format string and
+     integer to apr_pstrcat. Changed to apr_psprintf.
+     [Paul J. Reder]
+
   *) mod_mime: Workaround to prevent a segfault if r->filename=NULL
      [Brian Pane]
  
index fb0609f3eeda0d730bc2215e5361200ad33f0eaa..bf7ccbebfe78e1d724576b7f0979942ee05cd587 100644 (file)
@@ -532,11 +532,11 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in)
              * We include 304 Not Modified here too as this is the origin server
              * telling us to serve the cached copy.
              */
-              reason = apr_pstrcat(p, "Response status %d", r->status);
+              reason = apr_psprintf(p, "Response status %d", r->status);
         } 
         else if (exps != NULL && exp == APR_DATE_BAD) {
             /* if a broken Expires header is present, don't cache it */
-            reason = apr_pstrcat(p, "Broken expires header %s", exp);
+            reason = apr_psprintf(p, "Broken expires header %s", exp);
         }
         else if (r->args && exps == NULL) {
             /* if query string present but no expiration time, don't cache it