From: André Malo Date: Sat, 3 Apr 2004 23:22:18 +0000 (+0000) Subject: fix segfault, which occurs if no CT is set and wildcards are used. X-Git-Tag: pre_ajp_proxy~418 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4bf38ffc053f37dd13507078ec7b793200b23c7;p=apache fix segfault, which occurs if no CT is set and wildcards are used. PR: 28047 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103266 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 10fef61702..fa5a3e6684 100644 --- 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 ] diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c index 283c45f7ec..b70c123088 100644 --- a/modules/metadata/mod_expires.c +++ b/modules/metadata/mod_expires.c @@ -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.