diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2011-07-09 16:19:09 +0200 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2011-07-09 16:19:40 +0200 |
commit | 0c384449ae9511157cd9b34d73f8f4cb71123a45 (patch) | |
tree | 615e6a79509ad26cc2a38680fd76cc3c87cc8d9f | |
parent | c0e69db337540b22a3b3f739b1143341e7b759b7 (diff) |
libxtables: ignore whitespace in the multiaddress argument parser
References: http://bugzilla.netfilter.org/show_bug.cgi?id=727
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
-rw-r--r-- | iptables/xtables.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |