From: Larry Finger <Larry.Finger@lwfinger.net>
To: John Linville <linville@tuxdriver.com>, netdev@vger.kernel.org
Subject: [PATCH] bcm43xx-d80211: Fix an off-by-one condition in handle_irq_noise
Date: Mon, 10 Jul 2006 17:56:47 -0500 [thread overview]
Message-ID: <44B2DB2F.9090602@lwfinger.net> (raw)
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);
========================
next reply other threads:[~2006-07-10 22:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 22:56 Larry Finger [this message]
2006-07-10 23:02 ` [PATCH] bcm43xx-d80211: Fix an off-by-one condition in handle_irq_noise Michael Buesch
2006-07-10 23:11 ` 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=44B2DB2F.9090602@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=linville@tuxdriver.com \
--cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.