]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix configuration crashes on malformed sslproxy_* directives (#1603)
authorAlex <bigalex934@gmail.com>
Mon, 4 Dec 2023 16:45:29 +0000 (16:45 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 4 Dec 2023 16:45:35 +0000 (16:45 +0000)
src/cache_cf.cc

index 929bf75c378f219162c71791e7ecfc61c7b546a9..17b961ffa7b980e46bf8ea4a6bd27fee41e47710 100644 (file)
@@ -1119,6 +1119,9 @@ parse_obsolete(const char *name)
 
         // add the value as unquoted-string because the old values did not support whitespace
         const char *token = ConfigParser::NextQuotedOrToEol();
+        if (!token)
+            throw TextException(ToSBuf("missing required parameter for obsolete directive: ", name), Here());
+
         tmp.append(token, strlen(token));
         Security::ProxyOutgoingConfig.parse(tmp.c_str());
     }