From: Amos Jeffries Date: Sun, 28 Sep 2014 16:38:44 +0000 (-0700) Subject: Fix crash reading malformed config files X-Git-Tag: SQUID_3_5_0_1~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc3f1d5cd7d0c585706ce2267d3d8a957534063c;p=thirdparty%2Fsquid.git Fix crash reading malformed config files If ConfigParser::QuotedOrToEol() happend to return NULL. Which may happen if there is no token before end of current file the auth module config parser would crash. Detected by Coverity Scan. Issue 1222662. --- diff --git a/src/auth/Config.cc b/src/auth/Config.cc index fb2ef3f919..8798180907 100644 --- a/src/auth/Config.cc +++ b/src/auth/Config.cc @@ -86,7 +86,7 @@ Auth::Config::parse(Auth::Config * scheme, int n_configured, char *param_str) char *token = ConfigParser::NextQuotedOrToEol(); - while (*token && xisspace(*token)) + while (token && *token && xisspace(*token)) ++token; if (!token || !*token) {