]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libipt_REDIRECT: avoid dereference of uninitialized pointer
authorStephen Beahm <stephenbeahm@comcast.net>
Thu, 9 Dec 2010 11:15:50 +0000 (06:15 -0500)
committerJan Engelhardt <jengelh@medozas.de>
Sat, 8 Jan 2011 02:55:53 +0000 (03:55 +0100)
When using --to-ports with a port name instead of a numerical
specification, a segfault occurs.

References: http://bugzilla.netfilter.org/show_bug.cgi?id=691
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
extensions/libipt_REDIRECT.c

index 4760e655a2d8aaf7b1663ac3bc5698ce3e8be8ae..74b3aa13217d1f895dc04a22567549e852241be0 100644 (file)
@@ -41,7 +41,7 @@ static void REDIRECT_init(struct xt_entry_target *t)
 static void
 parse_ports(const char *arg, struct nf_nat_multi_range *mr)
 {
-       char *end;
+       char *end = "";
        unsigned int port, maxport;
 
        mr->range[0].flags |= IP_NAT_RANGE_PROTO_SPECIFIED;