nf_conntrack: fix memset() size.
Subsystems (2)
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]
---
net/netfilter/nf_conntrack_ftp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
applies-to: 84cf4e20ce5038cb701373c6d9f97195dfd23dfc 34b60542dcfb5fbc2f37de6157cc31d35c6b66df
net/netfilter/nf_conntrack_ftp.c +1 -1
@@ -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 ;
Hi,
From: Samir Bellabes <[email protected]>
Date: Wed, 25 Jan 2006 04:30:20 +0100
Quoted 6 lines
This patch fix a bad size in
memset().
The memory handle by 'structnf_conntrack_helperftp[MAX_PORTS][2]' is only set for ftp[*][0], but not for ftp[*][1].please apply, thanks
sam
Thanks. But I think better change is just removing this memset() because 'ftp' is declared in global area. Can I ask you to re-send a patch which just removes this memset() ?
-- Yasuyuki Kozakai
Quoted 8 lines · Yasuyuki KOZAKAI
From: Samir Bellabes <[email protected]>
Quoted 3 lines
This patch fix a bad size in
memset().
The memory handle by 'structnf_conntrack_helperftp[MAX_PORTS][2]' is only set for ftp[*][0], but not for ftp[*][1].Thanks. But I think better change is just removing this
memset()because 'ftp' is declared in global area. Can I ask you to re-send a patch which just removes thismemset()?
[PATCH] [NETFILTER] nf_conntrack_ftp : delete bogus memset()
This memset() is executing with a bad size.
According to Yasuyuki Kozakai, this memset() can be deleted, as 'ftp' is declared in global area.
---
net/netfilter/nf_conntrack_ftp.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
applies-to: 84cf4e20ce5038cb701373c6d9f97195dfd23dfc 2b9fb3186e686e0f1029c33d7a2aaa2dcf20b36f
net/netfilter/nf_conntrack_ftp.c +0 -2
@@ -657,8 +657,6 @@ 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 )); - ftp[i][0 ].tuple.src.l3num =PF_INET ; ftp[i][1 ].tuple.src.l3num =PF_INET6 ;for (j =0 ; j <2 ; j++) {
From: Samir Bellabes <[email protected]>
Date: Wed, 25 Jan 2006 05:44:06 +0100
Quoted 7 lines
[PATCH] [NETFILTER]
nf_conntrack_ftp: delete bogusmemset()This
memset()is executing with a bad size.
According to Yasuyuki Kozakai, thismemset()can be deleted, as 'ftp' is declared in global area.Signed-off-by Samir Bellabes <[email protected]>
Well, your mailer or something seems to replace tab with white spaces. OK, I've fixed up this to save more mails. Anyway, thanks a lot !
Harald, or Patrick, please apply this.
[PATCH] [NETFILTER] nf_conntrack_ftp : delete bogus memset()
This memset() is executing with a bad size.
According to Yasuyuki Kozakai, this memset() can be deleted, as 'ftp' is declared in global area.
---
net/netfilter/nf_conntrack_ftp.c +0 -2
@@ -657,8 +657,6 @@ 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 )); - ftp[i][0 ].tuple.src.l3num =PF_INET ; ftp[i][1 ].tuple.src.l3num =PF_INET6 ;for (j =0 ; j <2 ; j++) {
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Yasuyuki KOZAKAI
From: Samir Bellabes <[email protected]>
Date: Wed, 25 Jan 2006 05:44:06 +0100Quoted 6 lines
[PATCH] [NETFILTER]
nf_conntrack_ftp: delete bogusmemset()This
memset()is executing with a bad size.
According to Yasuyuki Kozakai, thismemset()can be deleted, as 'ftp' is declared in global area.
Quoted 7 lines
Quoted 1 line
Signed-off-by Samir Bellabes <[email protected]>Well, your mailer or something seems to replace tab with white spaces. OK, I've fixed up this to save more mails. Anyway, thanks a lot !
Harald, or Patrick, please apply this.
Done, thanks.