From: Mark Wooding Date: Mon, 2 May 2016 21:26:35 +0000 (+0100) Subject: noip.c: Have parsers fail if there's trailing junk. X-Git-Tag: 1.2.0~40 X-Git-Url: https://git.distorted.org.uk/~mdw/preload-hacks/commitdiff_plain/67fd355a2e7c05e391cdfc0748a848bae409a122 noip.c: Have parsers fail if there's trailing junk. --- diff --git a/noip.c b/noip.c index 5cbb84e..12c9f9c 100644 --- a/noip.c +++ b/noip.c @@ -1054,6 +1054,7 @@ static void parse_acl_line(char **pp, aclnode ***tail) if (*p != ',') break; if (*p) p++; } + if (*p) goto bad; *pp = p; return; @@ -1075,6 +1076,7 @@ static void parse_autoports(char **pp) if (*p != '-') goto bad; p++; NEXTNUMBER(q, del); y = strtoul(q, 0, 0); RESCAN(del); minautoport = x; maxautoport = y; + SKIPSPC; if (*p) goto bad; *pp = p; return;