diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2020-08-30 08:33:10 +0200 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2020-08-30 08:33:10 +0200 |
commit | 8e2385e1bd10918d012ab24ae52d26542c4a3c92 (patch) | |
tree | d58604e9a81654000c3fc420653a01f2cc96662b /server/core.c | |
parent | Fix a few warnings on 64 bits windows compilation (diff) | |
download | apache2-8e2385e1bd10918d012ab24ae52d26542c4a3c92.tar.xz apache2-8e2385e1bd10918d012ab24ae52d26542c4a3c92.zip |
Avoid a core dump at startup if "AllowOverride nonfatal" is used without any '=' after "nonfatal".
Note that "nonfatal=" (without anything else) or "nonfatal=foo" are still not reported as erroneous and are silently ignored.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1881311 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/core.c')
-rw-r--r-- | server/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/core.c b/server/core.c index e9df6617a7..8370812d86 100644 --- a/server/core.c +++ b/server/core.c @@ -1901,7 +1901,10 @@ static const char *set_override(cmd_parms *cmd, void *d_, const char *l) d->override |= OR_INDEXES; } else if (!ap_cstr_casecmp(w, "Nonfatal")) { - if (!ap_cstr_casecmp(v, "Override")) { + if (!v) { + return apr_pstrcat(cmd->pool, "=Override, =Unknown or =All expected after ", w, NULL); + } + else if (!ap_cstr_casecmp(v, "Override")) { d->override |= NONFATAL_OVERRIDE; } else if (!ap_cstr_casecmp(v, "Unknown")) { |