httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r569622 - /httpd/httpd/trunk/modules/metadata/mod_expires.c
Date Sat, 25 Aug 2007 05:55:39 GMT
Author: niq
Date: Fri Aug 24 22:55:37 2007
New Revision: 569622

URL: http://svn.apache.org/viewvc?rev=569622&view=rev
Log:
mod_expires - don't segfault on bad configuration.
PR 43213: Julien Perez

Modified:
    httpd/httpd/trunk/modules/metadata/mod_expires.c

Modified: httpd/httpd/trunk/modules/metadata/mod_expires.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_expires.c?rev=569622&r1=569621&r2=569622&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_expires.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_expires.c Fri Aug 24 22:55:37 2007
@@ -321,6 +321,9 @@
     const char *check;
 
     check = ap_strrchr_c(mime, '/');
+    if (check == NULL) {
+        return "Invalid mimetype: should contain a slash";
+    }
     if ((strlen(++check) == 1) && (*check == '*')) {
         dir_config->wildcards = 1;
     }



Mime
View raw message