b43: debugfs SHM read buffer overrun fix
PATCH 1/1 b43: debugfs SHM read buffer overrun fix
Fix possible buffer overrun.
Signed-off-by Michael Buesch <[email protected]>
---
We are searching a new b43legacy maintainer.
So if someone is interested in this job, please start with porting this easy patch to b43legacy. ;)
drivers/net/wireless/b43/debugfs.c +1 -1
@@ -128,7 +128,7 @@ static ssize_t shm_read_file(struct b43___le16 *le16buf = (__le16 *)buf;for (i =0 ; i <0x1000 ; i++) { -if (bufsize <=0 ) +if (bufsize <sizeof (tmp))break ; tmp =b43_shm_read16 (dev,B43_SHM_SHARED ,2 * i); le16buf[i] =cpu_to_le16 (tmp);