diff options
author | Bob Copeland <me@bobcopeland.com> | 2009-04-27 22:12:43 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-28 15:59:48 -0400 |
commit | b7fcb5c4a4c27da2f6d86cb03d18687e537442cf (patch) | |
tree | 45848311dcd1dd1a116edc48d18586825d7c047a /drivers/net/wireless/ath5k/debug.c | |
parent | 74aa9be0ea0ffeb233f45c39f3cf594b68bbbb89 (diff) |
ath5k: fix buffer overrun in rate debug code
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/debug.c')
-rw-r--r-- | 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 9770bb3d40f9..4904a07e4b59 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) | |||
424 | 424 | ||
425 | for (b = 0; b < IEEE80211_NUM_BANDS; b++) { | 425 | for (b = 0; b < IEEE80211_NUM_BANDS; b++) { |
426 | struct ieee80211_supported_band *band = &sc->sbands[b]; | 426 | struct ieee80211_supported_band *band = &sc->sbands[b]; |
427 | char bname[5]; | 427 | char bname[6]; |
428 | switch (band->band) { | 428 | switch (band->band) { |
429 | case IEEE80211_BAND_2GHZ: | 429 | case IEEE80211_BAND_2GHZ: |
430 | strcpy(bname, "2 GHz"); | 430 | strcpy(bname, "2 GHz"); |