Skip to content

Commit

Permalink
[NETFILTER]: nf_conntrack_sip: clear address in parse_addr()
Browse files Browse the repository at this point in the history
Some callers pass uninitialized structures, clear the address to make
sure later comparisions work properly.

Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Patrick McHardy committed Apr 14, 2008
1 parent c2f9c68 commit fa913dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/netfilter/nf_conntrack_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fa913dd

Please sign in to comment.