From: Jan Engelhardt Date: Sat, 9 Jul 2011 14:19:09 +0000 (+0200) Subject: libxtables: ignore whitespace in the multiaddress argument parser X-Git-Tag: v1.4.12~1^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c384449ae9511157cd9b34d73f8f4cb71123a45;p=thirdparty%2Fiptables.git libxtables: ignore whitespace in the multiaddress argument parser References: http://bugzilla.netfilter.org/show_bug.cgi?id=727 Signed-off-by: Jan Engelhardt --- diff --git a/iptables/xtables.c b/iptables/xtables.c index 3b173959..0f025920 100644 --- a/iptables/xtables.c +++ b/iptables/xtables.c @@ -1314,6 +1314,8 @@ void xtables_ipparse_multiple(const char *name, struct in_addr **addrpp, loop = name; for (i = 0; i < count; ++i) { + while (isspace(*loop)) + ++loop; next = strchr(loop, ','); if (next != NULL) len = next - loop; @@ -1628,6 +1630,8 @@ xtables_ip6parse_multiple(const char *name, struct in6_addr **addrpp, loop = name; for (i = 0; i < count /*NB: count can grow*/; ++i) { + while (isspace(*loop)) + ++loop; next = strchr(loop, ','); if (next != NULL) len = next - loop;