From 0c384449ae9511157cd9b34d73f8f4cb71123a45 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 9 Jul 2011 16:19:09 +0200 Subject: libxtables: ignore whitespace in the multiaddress argument parser References: http://bugzilla.netfilter.org/show_bug.cgi?id=727 Signed-off-by: Jan Engelhardt --- iptables/xtables.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'iptables') 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; -- cgit v1.2.3