netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nf_nat_core: fix memset size error
@ 2007-11-05  1:47 Li Zefan
  2007-11-06  0:13 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zefan @ 2007-11-05  1:47 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: netfilter-devel

Hi,

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

Signed-off-by Li Zefan <lizf@cn.fujitsu.com>

---
 net/ipv4/netfilter/nf_nat_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c
index 56e93f6..70e7997 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;
 }
-- 
1.5.3.rc7


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nf_nat_core: fix memset size error
  2007-11-05  1:47 [PATCH] nf_nat_core: fix memset size error Li Zefan
@ 2007-11-06  0:13 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2007-11-06  0:13 UTC (permalink / raw)
  To: Li Zefan; +Cc: netfilter-devel

Li Zefan wrote:
> Hi,
>
> The size passing to memset is the size of a pointer.
>
> Signed-off-by Li Zefan <lizf@cn.fujitsu.com>
>   

Applied, thanks Li.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-06  0:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-05  1:47 [PATCH] nf_nat_core: fix memset size error Li Zefan
2007-11-06  0:13 ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).