From: Christophe Jaillet Date: Sun, 30 Aug 2020 06:33:10 +0000 (+0000) Subject: Avoid a core dump at startup if "AllowOverride nonfatal" is used without any '='... X-Git-Tag: 2.5.0-alpha2-ci-test-only~1219 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8e2385e1bd10918d012ab24ae52d26542c4a3c92;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/server/core.c b/server/core.c index e9df6617a79..8370812d86f 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")) {