From: André Malo Date: Sat, 24 Apr 2004 11:43:02 +0000 (+0000) Subject: fix segfault, which occurs if no CT is set and wildcards are used. X-Git-Tag: 2.0.50~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=198900406f8aaef7d9a475ab122f3b6f6ab0adff;p=thirdparty%2Fapache%2Fhttpd.git fix segfault, which occurs if no CT is set and wildcards are used. 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 --- diff --git a/CHANGES b/CHANGES index 040dbdf4f1e..38bd99db816 100644 --- 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 , Thom May] diff --git a/STATUS b/STATUS index 2ded3fec00e..fffa6a81255 100644 --- 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 diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c index 283c45f7ec2..b70c123088f 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.