Bug 43213 - mod_expires.c segfaults when parsing configuration
Summary: mod_expires.c segfaults when parsing configuration
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_expires (show other bugs)
Version: 2.2.4
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2007-08-24 19:58 UTC by Julien Perez
Modified: 2007-08-27 05:55 UTC (History)
0 users



Attachments
Adds an error message when ExpiresByType is supplied with an invalid mimetype, avoids a segfault (500 bytes, patch)
2007-08-24 20:02 UTC, Julien Perez
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.