From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: Patrick McHardy <kaber@trash.net>, netfilter-devel@vger.kernel.org
Subject: [NETFILTER 01/03]: nf_nat: fix memset error
Date: Tue, 13 Nov 2007 11:55:41 +0100 (MET) [thread overview]
Message-ID: <20071113105501.25336.58654.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20071113105500.25336.39074.sendpatchset@localhost.localdomain>
[NETFILTER]: nf_nat: fix memset error
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>
---
commit dd9e04a6e68abf79470ef26e242ce516bba37b3d
tree 0d6b56e83d643661a9726931a577d6626a2cfb3f
parent 325d22df7b19e0116aff3391d3a03f73d0634ded
author Li Zefan <lizf@cn.fujitsu.com> Tue, 13 Nov 2007 11:24:16 +0100
committer Patrick McHardy <kaber@trash.net> Tue, 13 Nov 2007 11:24:16 +0100
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;
}
next prev parent reply other threads:[~2007-11-13 10:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 10:55 [NETFILTER 00/03]: Netfilter fixes Patrick McHardy
2007-11-13 10:55 ` Patrick McHardy [this message]
2007-11-13 10:57 ` [NETFILTER 01/03]: nf_nat: fix memset error David Miller
2007-11-13 10:55 ` [NETFILTER 02/03]: Consolidate nf_sockopt and compat_nf_sockopt Patrick McHardy
2007-11-13 10:58 ` David Miller
2007-11-13 10:55 ` [NETFILTER 03/03]: bridge: fix double POSTROUTING hook invocation Patrick McHardy
2007-11-13 10:59 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071113105501.25336.58654.sendpatchset@localhost.localdomain \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).