From: Li Zefan Date: Tue, 13 Nov 2007 10:57:16 +0000 (-0800) Subject: [NETFILTER]: nf_nat: fix memset error X-Git-Tag: v2.6.24-rc3~145^2~7 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e0bf9cf15fc30d300b7fbd821c6bc975531fab44;p=linux-2.6-omap-h63xx.git [NETFILTER]: nf_nat: fix memset error The size passing to memset is the size of a pointer. Signed-off-by: Li Zefan Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c index 56e93f692e8..70e7997ea28 100644 --- a/net/ipv4/netfilter/nf_nat_core.c +++ b/net/ipv4/netfilter/nf_nat_core.c @@ -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; }