Commit 3dca4dcf authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Better arg checking


git-svn-id: http://www.varnish-cache.org/svn/trunk@285 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 0a6262e8
......@@ -45,7 +45,7 @@ hcl_init(const char *p)
unsigned u1, u2;
i = sscanf(p, "%u,%u", &u1, &u2);
if (i == 0)
if (i <= 0)
return (0);
if (u1 == 0 || (i == 2 && (u2 == 0 || u2 > u1))) {
fprintf(stderr, "Invallid parameters to hash \"classic\":\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment