* [PATCH 2.6.30] ath5k: fix buffer overrun in rate debug code
@ 2009-04-28 2:12 Bob Copeland
0 siblings, 0 replies; only message in thread
From: Bob Copeland @ 2009-04-28 2:12 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
char bname[5] is too small for the string "X GHz" when the null
terminator is taken into account. Thus, turning on rate debugging
can crash unless we have lucky stack alignment.
Cc: stable@kernel.org
Reported-by: Paride Legovini <legovini@spiro.fisica.unipd.it>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
John, this patch should probably go for 2.6.30, I'll send a version for
wireless-testing next.
drivers/net/wireless/ath5k/debug.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/ath5k/debug.c
index 9770bb3..4904a07 100644
--- a/drivers/net/wireless/ath5k/debug.c
+++ b/drivers/net/wireless/ath5k/debug.c
@@ -424,7 +424,7 @@ ath5k_debug_dump_bands(struct ath5k_softc *sc)
for (b = 0; b < IEEE80211_NUM_BANDS; b++) {
struct ieee80211_supported_band *band = &sc->sbands[b];
- char bname[5];
+ char bname[6];
switch (band->band) {
case IEEE80211_BAND_2GHZ:
strcpy(bname, "2 GHz");
--
1.6.0.6
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-28 2:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-28 2:12 [PATCH 2.6.30] ath5k: fix buffer overrun in rate debug code Bob Copeland
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.