* [PATCH] b43: debugfs SHM read buffer overrun fix
@ 2007-11-02 17:35 Michael Buesch
0 siblings, 0 replies; only message in thread
From: Michael Buesch @ 2007-11-02 17:35 UTC (permalink / raw)
To: John Linville; +Cc: bcm43xx-dev, linux-wireless, Larry Finger
Fix possible buffer overrun.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
---
We are searching a new b43legacy maintainer.
So if someone is interested in this job, please start with porting
this easy patch to b43legacy. ;)
Index: wireless-2.6/drivers/net/wireless/b43/debugfs.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/b43/debugfs.c 2007-11-02 18:26:55.000000000 +0100
+++ wireless-2.6/drivers/net/wireless/b43/debugfs.c 2007-11-02 18:28:24.000000000 +0100
@@ -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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-02 17:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-02 17:35 [PATCH] b43: debugfs SHM read buffer overrun fix Michael Buesch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).