]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
fix segfault, which occurs if no CT is set and wildcards are used.
authorAndré Malo <nd@apache.org>
Sat, 24 Apr 2004 11:43:02 +0000 (11:43 +0000)
committerAndré Malo <nd@apache.org>
Sat, 24 Apr 2004 11:43:02 +0000 (11:43 +0000)
PR: 28047
Reviewed by: Brad Nicholes, Jeff Trawick

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

CHANGES
STATUS
modules/metadata/mod_expires.c

diff --git a/CHANGES b/CHANGES
index 040dbdf4f1e0ea0f4dd9739d7f9de2c6d42a2075..38bd99db8168fcb52c60fb1a36d16c804dadaf5e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.50
 
+  *) Fix segfault in mod_expires, which occured under certain
+     circumstances. PR 28047.  [André Malo]
+
   *) htpasswd: use apr_temp_dir_get() and general cleanup
      [Guenter Knauf <eflash gmx.net>, Thom May]
 
diff --git a/STATUS b/STATUS
index 2ded3fec00ee2f434817893b6735b79069cb806c..fffa6a8125534b9cde8eef79aa01d36bc4a9dd55 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2004/04/24 11:28:20 $]
+Last modified at [$Date: 2004/04/24 11:43:01 $]
 
 Release:
 
@@ -144,10 +144,6 @@ PATCHES TO BACKPORT FROM 2.1
          http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/core.c?r1=1.272&r2=1.273
        +1: nd (geoff)
 
-    *) Fix segfault in mod_expires. PR 28047
-         modules/metadata/mod_expires.c: r1.54
-       +1: nd, bnicholes, trawick
-
     *) Fix memory leak in mod_rewrite. PR 27862. (2.0 + 1.3)
          http://www.apache.org/~nd/mod_rewrite_fixleak.diff
        +1: nd
index 283c45f7ec29dae8ba1b13b9bd91d8c7eb56c444..b70c123088f3b7c38a06de0169a7ac0e66172ad7 100644 (file)
@@ -482,7 +482,7 @@ static apr_status_t expires_filter(ap_filter_t *f,
                 char *checkmime;
                 char *spos;
                 checkmime = apr_pstrdup(r->pool, r->content_type);
-                spos = strchr(checkmime, '/');
+                spos = checkmime ? ap_strchr(checkmime, '/') : NULL;
                 if (spos != NULL) {
                     /*
                      * Without a '/' character, nothing we have will match.