Skip to contentSkip to conversation

nf_nat_core: fix memset size error

PATCH Applied Li Zefan 2 participants 2 messages Nov 5, 2007 – Nov 6, 2007

Subsystems (2)
lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH 1/1 nf_nat_core: fix memset size error

Hi,

The size passing to memset is the size of a pointer.

Signed-off-by Li Zefan <[email protected]>

---
 net/ipv4/netfilter/nf_nat_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv4/netfilter/nf_nat_core.c +1 -1
index 56e93f6..70e7997 100644
@@ -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;
 }
Signature · 1 line
1.5.3.rc7