]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Complain during parsing if https_port version is not in (1..4)
authorwessels <>
Sat, 7 May 2005 04:35:46 +0000 (04:35 +0000)
committerwessels <>
Sat, 7 May 2005 04:35:46 +0000 (04:35 +0000)
src/cache_cf.cc

index 87daacc88d27bc265f1ff0d8bac20fc4eb04dc79..49aa8eb6504c4e0d2038c6aa027bfbf4d3bbb10c 100644 (file)
@@ -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);