From: Patrick McHardy Date: Mon, 14 Apr 2008 09:15:45 +0000 (+0200) Subject: [NETFILTER]: nf_conntrack_sip: clear address in parse_addr() X-Git-Tag: v2.6.26-rc1~1138^2~89^2~26 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa913ddf6372b20b23061996150d38f639488d42;p=linux-2.6 [NETFILTER]: nf_conntrack_sip: clear address in parse_addr() Some callers pass uninitialized structures, clear the address to make sure later comparisions work properly. Signed-off-by: Patrick McHardy --- diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index da5dec6e61..f3915f8724 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c @@ -145,6 +145,7 @@ static int parse_addr(const struct nf_conn *ct, const char *cp, int family = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num; int ret = 0; + memset(addr, 0, sizeof(*addr)); switch (family) { case AF_INET: ret = in4_pton(cp, limit - cp, (u8 *)&addr->ip, -1, &end);