From: Larry Finger <Larry.Finger@lwfinger.net>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] Staging: rtl8192e: off by one in rtl8192_get_channel_map()
Date: Wed, 21 Sep 2011 15:33:34 +0000 [thread overview]
Message-ID: <4E7A03CE.5070806@lwfinger.net> (raw)
In-Reply-To: <20110921071704.GI4999@elgon.mountain>
On 09/21/2011 02:17 AM, Dan Carpenter wrote:
> COUNTRY_CODE_MAX is not a valid country code. We're off by one here.
> This gets passed to Dot11d_Channelmap() where it's used as an offset
> into the ChannelPlan[] array.
>
> Signed-off-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Dan, good catch. Did this cause a problem, or did you find it while reading the
code?
Larry
>
> diff --git a/drivers/staging/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl_core.c
> index 6530058..1beb04f 100644
> --- a/drivers/staging/rtl8192e/rtl_core.c
> +++ b/drivers/staging/rtl8192e/rtl_core.c
> @@ -1308,7 +1308,7 @@ static short rtl8192_get_channel_map(struct net_device *dev)
> return -1;
> }
>
> - if (priv->ChannelPlan> COUNTRY_CODE_MAX) {
> + if (priv->ChannelPlan>= COUNTRY_CODE_MAX) {
> printk(KERN_INFO "rtl819x_init:Error channel plan! Set to "
> "default.\n");
> priv->ChannelPlan = COUNTRY_CODE_FCC;
>
next prev parent reply other threads:[~2011-09-21 15:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 7:17 [patch] Staging: rtl8192e: off by one in rtl8192_get_channel_map() Dan Carpenter
2011-09-21 15:33 ` Larry Finger [this message]
2011-09-21 16:25 ` Larry Finger
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=4E7A03CE.5070806@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=kernel-janitors@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