mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
b43legacy: fix possible buffer overrun in debugfs
Fix possible buffer overrun. The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to b43legacy. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
35c7e6602b
commit
187a9dca3f
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ static ssize_t shm_read_file(struct b43legacy_wldev *dev, char *buf, size_t bufs
|
|||
__le16 *le16buf = (__le16 *)buf;
|
||||
|
||||
for (i = 0; i < 0x1000; i++) {
|
||||
if (bufsize <= 0)
|
||||
if (bufsize < sizeof(tmp))
|
||||
break;
|
||||
tmp = b43legacy_shm_read16(dev, B43legacy_SHM_SHARED, 2 * i);
|
||||
le16buf[i] = cpu_to_le16(tmp);
|
||||
|
|
Loading…
Reference in a new issue