diff options
author | Nick Kew <niq@apache.org> | 2007-08-25 07:55:37 +0200 |
---|---|---|
committer | Nick Kew <niq@apache.org> | 2007-08-25 07:55:37 +0200 |
commit | 32c45436bd38071f544db50a9610ee43dc6f6b12 (patch) | |
tree | 08fd97563117801a0e317fd67fdf1ad4724de2c4 /modules/metadata | |
parent | Note log.c refactoring. (diff) | |
download | apache2-32c45436bd38071f544db50a9610ee43dc6f6b12.tar.xz apache2-32c45436bd38071f544db50a9610ee43dc6f6b12.zip |
mod_expires - don't segfault on bad configuration.
PR 43213: Julien Perez
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@569622 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/metadata')
-rw-r--r-- | modules/metadata/mod_expires.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c index caf9b2b70c..984ee9312a 100644 --- a/modules/metadata/mod_expires.c +++ b/modules/metadata/mod_expires.c @@ -321,6 +321,9 @@ static const char *set_expiresbytype(cmd_parms *cmd, void *in_dir_config, 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; } |