aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2007-11-02 13:35:02 -0400
committerJeff Garzik <jeff@garzik.org>2007-11-10 04:25:12 -0500
commit30c4ae42317666f3aeed658cdb8803c84ac6fe77 (patch)
treec1bc8e501b3fb2c41f53dda7dc2a28f6a3dbf81e /drivers/net/wireless/b43
parent80fda03fc8b5cd09c3e0e90725ef9bcb2a5c7b30 (diff)
b43: debugfs SHM read buffer overrun fix
Fix possible buffer overrun. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r--drivers/net/wireless/b43/debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/b43/debugfs.c
index 734e70e1a06d..ef0075d9f9cb 100644
--- a/drivers/net/wireless/b43/debugfs.c
+++ b/drivers/net/wireless/b43/debugfs.c
@@ -128,7 +128,7 @@ static ssize_t shm_read_file(struct b43_wldev *dev,
128 __le16 *le16buf = (__le16 *)buf; 128 __le16 *le16buf = (__le16 *)buf;
129 129
130 for (i = 0; i < 0x1000; i++) { 130 for (i = 0; i < 0x1000; i++) {
131 if (bufsize <= 0) 131 if (bufsize < sizeof(tmp))
132 break; 132 break;
133 tmp = b43_shm_read16(dev, B43_SHM_SHARED, 2 * i); 133 tmp = b43_shm_read16(dev, B43_SHM_SHARED, 2 * i);
134 le16buf[i] = cpu_to_le16(tmp); 134 le16buf[i] = cpu_to_le16(tmp);