mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
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>
This commit is contained in:
parent
04c5b17a74
commit
0e3b800e71
1 changed files with 1 additions and 0 deletions
|
@ -863,6 +863,7 @@ static void lan9118_eeprom_cmd(lan9118_state *s, int cmd, int addr)
|
||||||
} else {
|
} else {
|
||||||
DPRINTF("EEPROM Write All (ignored)\n");
|
DPRINTF("EEPROM Write All (ignored)\n");
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case 5: /* ERASE */
|
case 5: /* ERASE */
|
||||||
if (s->eeprom_writable) {
|
if (s->eeprom_writable) {
|
||||||
s->eeprom[addr] = 0xff;
|
s->eeprom[addr] = 0xff;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue