]> git.baikalelectronics.ru Git - kernel.git/commit
ath5k: snprintf() returns largish values
authorDan Carpenter <error27@gmail.com>
Thu, 22 Jul 2010 08:52:02 +0000 (10:52 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 26 Jul 2010 19:32:41 +0000 (15:32 -0400)
commitc5d7c915396143dd181af73b61f3c07c5a6a8d7b
tree4d5613993d0e19b2f0c04d4df89061f20a80782a
parent7feb0c13fea2a42bc38ce75d6e8d7b9ab475ec8d
ath5k: snprintf() returns largish values

snprintf() returns the number of characters that would have been written
(not counting the NUL character).  So we can't use it as the limiter to
simple_read_from_buffer() without capping it first at sizeof(buf).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/debug.c