* [Qemu-trivial] [PATCH] hw/lan9118.c: Add missing 'break' to fix buffer overrun
@ 2011-11-09 18:59 Peter Maydell
2011-11-10 11:34 ` [Qemu-trivial] [Qemu-devel] " Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2011-11-09 18:59 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, patches
Add a missing 'break' statement to fix a buffer overrun when
executing the EEPROM write-all command. Spotted by Coverity
(see bug 887883).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/lan9118.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/hw/lan9118.c b/hw/lan9118.c
index 634b88e..f8149e6 100644
--- a/hw/lan9118.c
+++ b/hw/lan9118.c
@@ -863,6 +863,7 @@ static void lan9118_eeprom_cmd(lan9118_state *s, int cmd, int addr)
} else {
DPRINTF("EEPROM Write All (ignored)\n");
}
+ break;
case 5: /* ERASE */
if (s->eeprom_writable) {
s->eeprom[addr] = 0xff;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-10 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-09 18:59 [Qemu-trivial] [PATCH] hw/lan9118.c: Add missing 'break' to fix buffer overrun Peter Maydell
2011-11-10 11:34 ` [Qemu-trivial] [Qemu-devel] " Stefan Hajnoczi
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).