ath5k: fix buffer overrun in rate debug code
commitf8c890f0bc401fd581a27062fcb989ef19893318
authorBob Copeland <me@bobcopeland.com>
Tue, 28 Apr 2009 02:12:43 +0000 (27 22:12 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 May 2009 22:45:09 +0000 (8 15:45 -0700)
tree2b215ba7cdb34c61aec5406e47b9178e94c965e2
parent7843dcfe1115e9412e6e83492e17f9c75b5a062d
ath5k: fix buffer overrun in rate debug code

commit b7fcb5c4a4c27da2f6d86cb03d18687e537442cf upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath5k/debug.c