Re: [NETFILTER]: Use correct type for "ports" module parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 13, 2005 at 06:00:23PM -0700, Linux Kernel Mailing List wrote:
> --- a/net/ipv4/netfilter/ip_conntrack_ftp.c
> +++ b/net/ipv4/netfilter/ip_conntrack_ftp.c
> @@ -29,9 +29,9 @@ static char *ftp_buffer;
>  static DEFINE_SPINLOCK(ip_ftp_lock);
>  
>  #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);

Shouldn't this be unsigned short?  As near as I can tell the negative sign 
extension will result in the same problem this patch was trying to fix as 
the code does 'sprintf(tmpname, "ftp-%d", ports[i]);'...

		-ben

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux