]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/lan9118.c: Add missing 'break' to fix buffer overrun
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 9 Nov 2011 18:59:54 +0000 (18:59 +0000)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Thu, 10 Nov 2011 12:29:50 +0000 (12:29 +0000)
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>
hw/lan9118.c

index 634b88ee14a6568911de0e80a09269ca348d33d6..f8149e6983516f905eaafc7a2fcdd50ff9ea7683 100644 (file)
@@ -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;