Bug 43213

Summary: mod_expires.c segfaults when parsing configuration
Product: Apache httpd-2 Reporter: Julien Perez <julien.perez>
Component: mod_expiresAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: normal Keywords: PatchAvailable
Priority: P2    
Version: 2.2.4   
Target Milestone: ---   
Hardware: Other   
OS: other   
Attachments: Adds an error message when ExpiresByType is supplied with an invalid mimetype, avoids a segfault

Description Julien Perez 2007-08-24 19:58:36 UTC
mod_expires.c segfaults when parsing configuration if a line with the directive
ExpiresByType is used with a mimetype which doesnt contain any slash.

Bad code:
    check = ap_strrchr_c(mime, '/');
    if ((strlen(++check) == 1) && (*check == '*')) {
        dir_config->wildcards = 1;
    }

Patch submitted in attachment which returns an error message when the mimetype
is supplied without slash.
Comment 1 Julien Perez 2007-08-24 20:02:56 UTC
Created attachment 20708 [details]
Adds an error message when ExpiresByType is supplied with an invalid mimetype, avoids a segfault
Comment 2 Nick Kew 2007-08-24 22:56:44 UTC
Thanks for the report.  Fixed in /trunk/ - r569622.
Comment 3 Nick Kew 2007-08-27 05:55:14 UTC
Fixed in r570093.