From: wessels <> Date: Sat, 7 May 2005 04:35:46 +0000 (+0000) Subject: Complain during parsing if https_port version is not in (1..4) X-Git-Tag: SQUID_3_0_PRE4~778 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8bbd476e68be7eddad5e9e69819e51ef6c34e5a3;p=thirdparty%2Fsquid.git Complain during parsing if https_port version is not in (1..4) --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 87daacc88d..49aa8eb650 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.473 2005/05/06 01:57:55 hno Exp $ + * $Id: cache_cf.cc,v 1.474 2005/05/06 22:35:46 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -2922,6 +2922,9 @@ parse_https_port_list(https_port_list ** head) s->key = xstrdup(token + 4); } else if (strncmp(token, "version=", 8) == 0) { s->version = xatoi(token + 8); + + if (s->version < 1 || s->version > 4) + self_destruct(); } else if (strncmp(token, "options=", 8) == 0) { safe_free(s->options); s->options = xstrdup(token + 8);