All of lore.kernel.org
 help / color / mirror / Atom feed
* [NETFILTER] nf_conntrack: fix memset() size.
@ 2006-01-25  3:30 Samir Bellabes
  2006-01-25  4:05 ` Yasuyuki KOZAKAI
  0 siblings, 1 reply; 5+ messages in thread
From: Samir Bellabes @ 2006-01-25  3:30 UTC (permalink / raw)
  To: David S. Miller; +Cc: netfilter-devel, Yasuyuki Kozakai

Hi,

This patch fix a bad size in memset().
The memory handle by 'struct nf_conntrack_helper ftp[MAX_PORTS][2]' is
only set for ftp[*][0], but not for ftp[*][1].

please apply, thanks
sam


[NETFILTER] nf_conntrack: fix memset() size.

memset() don't set memory of the 'struct nf_conntrack_helper' at ftp[*][1]

Signed-off-by: Samir Bellabes <sbellabes@mandriva.com>

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

applies-to: 84cf4e20ce5038cb701373c6d9f97195dfd23dfc
34b60542dcfb5fbc2f37de6157cc31d35c6b66df
diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c
index ab0c920..e2c9f36 100644
--- a/net/netfilter/nf_conntrack_ftp.c
+++ b/net/netfilter/nf_conntrack_ftp.c
@@ -657,7 +657,7 @@ static int __init init(void)
        /* FIXME should be configurable whether IPv4 and IPv6 FTP connections
                 are tracked or not - YK */
        for (i = 0; i < ports_c; i++) {
-               memset(&ftp[i], 0, sizeof(struct nf_conntrack_helper));
+               memset(&ftp[i], 0, 2*sizeof(struct nf_conntrack_helper));
                
                ftp[i][0].tuple.src.l3num = PF_INET;
                ftp[i][1].tuple.src.l3num = PF_INET6;

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

end of thread, other threads:[~2006-01-25  8:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-25  3:30 [NETFILTER] nf_conntrack: fix memset() size Samir Bellabes
2006-01-25  4:05 ` Yasuyuki KOZAKAI
2006-01-25  4:44   ` Samir Bellabes
2006-01-25  5:41     ` Yasuyuki KOZAKAI
     [not found]     ` <200601250541.k0P5fnG7019802@toshiba.co.jp>
2006-01-25  8:43       ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.