public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin LaHaise <bcrl@kvack.org>
To: davem@davemloft.net
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [NETFILTER]: Use correct type for "ports" module parameter
Date: Thu, 15 Sep 2005 13:57:25 -0400	[thread overview]
Message-ID: <20050915175725.GD8677@kvack.org> (raw)
In-Reply-To: <200509140100.j8E10NLw009915@hera.kernel.org>

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


           reply	other threads:[~2005-09-15 17:58 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200509140100.j8E10NLw009915@hera.kernel.org>]

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=20050915175725.GD8677@kvack.org \
    --to=bcrl@kvack.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@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