Skip to content

Commit

Permalink
[NETFILTER]: nf_nat: fix memset error
Browse files Browse the repository at this point in the history
The size passing to memset is the size of a pointer.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Li Zefan authored and David S. Miller committed Nov 13, 2007
1 parent d71209d commit e0bf9cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/nf_nat_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ static int clean_nat(struct nf_conn *i, void *data)

if (!nat)
return 0;
memset(nat, 0, sizeof(nat));
memset(nat, 0, sizeof(*nat));
i->status &= ~(IPS_NAT_MASK | IPS_NAT_DONE_MASK | IPS_SEQ_ADJUST);
return 0;
}
Expand Down

0 comments on commit e0bf9cf

Please sign in to comment.