From: Stefano Brivio <stefano.brivio@polimi.it>
To: John Linville <linville@tuxdriver.com>
Cc: bcm43xx-dev@lists.berlios.de, linux-wireless@vger.kernel.org,
Larry Finger <larry.finger@lwfinger.net>
Subject: [PATCH 3/7] b43legacy: fix possible buffer overrun in debugfs
Date: Tue, 6 Nov 2007 22:48:36 +0100 [thread overview]
Message-ID: <20071106224836.0d90cb4c@morte> (raw)
In-Reply-To: <20071106222313.31e9bcd9@morte>
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>
----
Index: wireless-2.6/drivers/net/wireless/b43legacy/debugfs.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/b43legacy/debugfs.c
+++ wireless-2.6/drivers/net/wireless/b43legacy/debugfs.c
@@ -124,7 +124,7 @@ static ssize_t shm_read_file(struct b43l
__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);
--
Ciao
Stefano
--
Ciao
Stefano
next prev parent reply other threads:[~2007-11-06 22:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071106222313.31e9bcd9@morte>
2007-11-06 21:48 ` [PATCH 2/7] b43legacy: use a consistent naming scheme for the ops Stefano Brivio
2007-11-06 21:48 ` Stefano Brivio [this message]
2007-11-06 21:48 ` [PATCH 4/7] b43legacy: rewrite and fix rfkill initialization Stefano Brivio
2007-11-06 21:48 ` [PATCH 5/7] b43legacy: add me as maintainer and fix URLs Stefano Brivio
2007-11-06 21:49 ` [PATCH 6/7] b43: rewrite A PHY initialization Stefano Brivio
2007-11-06 21:49 ` [PATCH 7/7] b43/b43legacy: fix my copyright notices Stefano Brivio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071106224836.0d90cb4c@morte \
--to=stefano.brivio@polimi.it \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=larry.finger@lwfinger.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.