]> granicus.if.org Git - apache/commitdiff
fix segfault, which occurs if no CT is set and wildcards are used.
authorAndré Malo <nd@apache.org>
Sat, 3 Apr 2004 23:22:18 +0000 (23:22 +0000)
committerAndré Malo <nd@apache.org>
Sat, 3 Apr 2004 23:22:18 +0000 (23:22 +0000)
PR: 28047

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

CHANGES
modules/metadata/mod_expires.c

diff --git a/CHANGES b/CHANGES
index 10fef6170226c6902d1ad1a99f985819a05c16be..fa5a3e668416df5ca3a855044a45f327a63871f6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) Fix segfault in mod_expires, which occured under certain
+     circumstances. PR 28047.  [André Malo]
+
   *) mod_logio no longer removes the EOS bucket. PR 27928.
      [Bojan Smojver <bojan rexursive.com>]
 
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.