netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcm43xx-d80211: Fix an off-by-one condition in handle_irq_noise
@ 2006-07-10 22:56 Larry Finger
  2006-07-10 23:02 ` Michael Buesch
  0 siblings, 1 reply; 3+ messages in thread
From: Larry Finger @ 2006-07-10 22:56 UTC (permalink / raw)
  To: John Linville, netdev

An assert statement near the start of handle_irq_noise in the d80211 version of bcm43xx_main.c is 
there to protect against out of bound addressing using variable bcm->noisecalc.nr_samples. The 
arrays in question have a dimension of 8, thus the value must be < 8. This patch mirrors the one 
submitted earlier for the softmac version of bcm43xx.

Signed-Off-By: Larry.Finger <Larry.Finger@lwfinger.net>

========================================================

index 7ed18ca..37bb0dd 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -1534,7 +1534,7 @@ static void handle_irq_noise(struct bcm4
  		goto generate_new;

  	/* Get the noise samples. */
-	assert(bcm->noisecalc.nr_samples <= 8);
+	assert(bcm->noisecalc.nr_samples < 8);
  	i = bcm->noisecalc.nr_samples;
  	noise[0] = limit_value(noise[0], 0, ARRAY_SIZE(radio->nrssi_lt) - 1);
  	noise[1] = limit_value(noise[1], 0, ARRAY_SIZE(radio->nrssi_lt) - 1);

========================

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] bcm43xx-d80211: Fix an off-by-one condition in handle_irq_noise
  2006-07-10 22:56 [PATCH] bcm43xx-d80211: Fix an off-by-one condition in handle_irq_noise Larry Finger
@ 2006-07-10 23:02 ` Michael Buesch
  2006-07-10 23:11   ` Larry Finger
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Buesch @ 2006-07-10 23:02 UTC (permalink / raw)
  To: Larry Finger; +Cc: John Linville, netdev

On Tuesday 11 July 2006 00:56, you wrote:
> An assert statement near the start of handle_irq_noise in the d80211 version of bcm43xx_main.c is 
> there to protect against out of bound addressing using variable bcm->noisecalc.nr_samples. The 
> arrays in question have a dimension of 8, thus the value must be < 8. This patch mirrors the one 
> submitted earlier for the softmac version of bcm43xx.
> 
> Signed-Off-By: Larry.Finger <Larry.Finger@lwfinger.net>
> 
> ========================================================
> 
> index 7ed18ca..37bb0dd 100644
> --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c
> +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c

This is not a patch against bcm43xx-d80211.

> @@ -1534,7 +1534,7 @@ static void handle_irq_noise(struct bcm4
>   		goto generate_new;
> 
>   	/* Get the noise samples. */
> -	assert(bcm->noisecalc.nr_samples <= 8);
> +	assert(bcm->noisecalc.nr_samples < 8);
>   	i = bcm->noisecalc.nr_samples;
>   	noise[0] = limit_value(noise[0], 0, ARRAY_SIZE(radio->nrssi_lt) - 1);
>   	noise[1] = limit_value(noise[1], 0, ARRAY_SIZE(radio->nrssi_lt) - 1);
> 
> ========================
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bcm43xx-d80211: Fix an off-by-one condition in handle_irq_noise
  2006-07-10 23:02 ` Michael Buesch
@ 2006-07-10 23:11   ` Larry Finger
  0 siblings, 0 replies; 3+ messages in thread
From: Larry Finger @ 2006-07-10 23:11 UTC (permalink / raw)
  To: Michael Buesch; +Cc: John Linville, netdev

Michael Buesch wrote:
> On Tuesday 11 July 2006 00:56, you wrote:
>> An assert statement near the start of handle_irq_noise in the d80211 version of bcm43xx_main.c is 
>> there to protect against out of bound addressing using variable bcm->noisecalc.nr_samples. The 
>> arrays in question have a dimension of 8, thus the value must be < 8. This patch mirrors the one 
>> submitted earlier for the softmac version of bcm43xx.
>>
>> Signed-Off-By: Larry.Finger <Larry.Finger@lwfinger.net>
>>
>> ========================================================
>>
>> index 7ed18ca..37bb0dd 100644
>> --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c
>> +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
> 
> This is not a patch against bcm43xx-d80211.
> 

Sorry. I misunderstood the organization of wireless-dev. The correct patch will be sent shortly.

Larry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-10 23:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-10 22:56 [PATCH] bcm43xx-d80211: Fix an off-by-one condition in handle_irq_noise Larry Finger
2006-07-10 23:02 ` Michael Buesch
2006-07-10 23:11   ` Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).