Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=187a9dca3f2f90341e321a3998a5b0c74111f77c Commit: 187a9dca3f2f90341e321a3998a5b0c74111f77c Parent: 35c7e6602b81bdacb745f04236a419402777139e Author: Stefano Brivio <[EMAIL PROTECTED]> AuthorDate: Tue Nov 6 22:48:36 2007 +0100 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Sat Nov 10 04:25:13 2007 -0500
b43legacy: fix possible buffer overrun in debugfs Fix possible buffer overrun. The patch to b43 by Michael Buesch <[EMAIL PROTECTED]> has been ported to b43legacy. Signed-off-by: Stefano Brivio <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- drivers/net/wireless/b43legacy/debugfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/b43legacy/debugfs.c b/drivers/net/wireless/b43legacy/debugfs.c index eefa6fb..619b453 100644 --- a/drivers/net/wireless/b43legacy/debugfs.c +++ b/drivers/net/wireless/b43legacy/debugfs.c @@ -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); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html