From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH 6/7] lan9118: fix a buffer overflow
Date: Sat, 8 Jan 2011 18:25:21 +0000 [thread overview]
Message-ID: <AANLkTik-S2V3B-rs37eTPumc8A8spvaCBk6Y3SqBHWEX@mail.gmail.com> (raw)
Fix a buffer overflow, reported by cppcheck:
[/src/qemu/hw/lan9118.c:849]: (error) Buffer access out-of-bounds: s.eeprom
All eeprom handling code assumes that the size of eeprom is 128.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
hw/lan9118.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/lan9118.c b/hw/lan9118.c
index a988664..1bb829e 100644
--- a/hw/lan9118.c
+++ b/hw/lan9118.c
@@ -187,7 +187,7 @@ typedef struct {
uint32_t phy_int_mask;
int eeprom_writable;
- uint8_t eeprom[8];
+ uint8_t eeprom[128];
int tx_fifo_size;
LAN9118Packet *txp;
--
1.6.2.4
next reply other threads:[~2011-01-08 18:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-08 18:25 Blue Swirl [this message]
2011-01-10 12:45 ` [Qemu-devel] [PATCH 6/7] lan9118: fix a buffer overflow Markus Armbruster
2011-01-10 21:50 ` Blue Swirl
2011-01-10 22:14 ` Peter Maydell
2011-01-11 9:10 ` Markus Armbruster
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=AANLkTik-S2V3B-rs37eTPumc8A8spvaCBk6Y3SqBHWEX@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/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 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).