diff options
author | Patrick McHardy <kaber@trash.net> | 2005-09-13 13:48:00 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-13 13:48:00 -0700 |
commit | 5cb30640ce01d76d256533bb2824c9cc14eb4070 (patch) | |
tree | 1ed9c7e0c13c049dbc8bcc55a852dc0aad00df3d /net/ipv4/netfilter/ip_conntrack_tftp.c | |
parent | f3591fff043f5df937120962668c8adfcd3f5b29 (diff) | |
download | op-kernel-dev-5cb30640ce01d76d256533bb2824c9cc14eb4070.zip op-kernel-dev-5cb30640ce01d76d256533bb2824c9cc14eb4070.tar.gz |
[NETFILTER]: Use correct type for "ports" module parameter
With large port numbers the helper_names buffer can overflow.
Noticed by Samir Bellabes <sbellabes@mandriva.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/netfilter/ip_conntrack_tftp.c')
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_tftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_tftp.c b/net/ipv4/netfilter/ip_conntrack_tftp.c index d2b5905..a78736b 100644 --- a/net/ipv4/netfilter/ip_conntrack_tftp.c +++ b/net/ipv4/netfilter/ip_conntrack_tftp.c @@ -26,9 +26,9 @@ MODULE_DESCRIPTION("tftp connection tracking helper"); MODULE_LICENSE("GPL"); #define MAX_PORTS 8 -static int ports[MAX_PORTS]; +static short ports[MAX_PORTS]; static int ports_c; -module_param_array(ports, int, &ports_c, 0400); +module_param_array(ports, short, &ports_c, 0400); MODULE_PARM_DESC(ports, "port numbers of tftp servers"); #if 0 @@ -100,7 +100,7 @@ static int tftp_help(struct sk_buff **pskb, } static struct ip_conntrack_helper tftp[MAX_PORTS]; -static char tftp_names[MAX_PORTS][10]; +static char tftp_names[MAX_PORTS][sizeof("tftp-65535")]; static void fini(void) { |