From b4bf38ffc053f37dd13507078ec7b793200b23c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Malo?= Date: Sat, 3 Apr 2004 23:22:18 +0000 Subject: [PATCH] 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 --- CHANGES | 3 +++ modules/metadata/mod_expires.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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. -- 2.50.1