aboutsummaryrefslogtreecommitdiffstats
path: root/hw/lan9118.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-11-09 18:59:54 +0000
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-11-10 12:29:50 +0000
commit0e3b800e71cb7759d099eabbd8ad4c4fe848e381 (patch)
tree73c7d14b6e698911e9bb21720cb0ad1157355ba2 /hw/lan9118.c
parent04c5b17a74c9d6c309181079f8949665b43b0164 (diff)
hw/lan9118.c: Add missing 'break' to fix buffer overrun
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> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'hw/lan9118.c')
-rw-r--r--hw/lan9118.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/lan9118.c b/hw/lan9118.c
index 634b88ee1..f8149e698 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;