qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 6/7] lan9118: fix a buffer overflow
@ 2011-01-08 18:25 Blue Swirl
  2011-01-10 12:45 ` Markus Armbruster
  0 siblings, 1 reply; 5+ messages in thread
From: Blue Swirl @ 2011-01-08 18:25 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-11  9:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-08 18:25 [Qemu-devel] [PATCH 6/7] lan9118: fix a buffer overflow Blue Swirl
2011-01-10 12:45 ` Markus Armbruster
2011-01-10 21:50   ` Blue Swirl
2011-01-10 22:14     ` Peter Maydell
2011-01-11  9:10       ` Markus Armbruster

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).