]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Avoid a core dump at startup if "AllowOverride nonfatal" is used without any '='...
authorChristophe Jaillet <jailletc36@apache.org>
Sun, 30 Aug 2020 06:33:10 +0000 (06:33 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sun, 30 Aug 2020 06:33:10 +0000 (06:33 +0000)
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

server/core.c

index e9df6617a79f8d24a5174c1bbf125c6c74b54765..8370812d86f76c9957534ee153f5de7ccc5dfd5f 100644 (file)
@@ -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")) {