render / rpms / qemu

Forked from rpms/qemu 5 months ago
Clone

Blame 0213-hw-lan9118.c-Add-missing-break-to-fix-buffer-overrun.patch

cd9d16
From e9552556f514b334b78ed56e32b4af366b429a0b Mon Sep 17 00:00:00 2001
cd9d16
From: Peter Maydell <peter.maydell@linaro.org>
cd9d16
Date: Wed, 9 Nov 2011 18:59:54 +0000
cd9d16
Subject: [PATCH] hw/lan9118.c: Add missing 'break' to fix buffer overrun
cd9d16
MIME-Version: 1.0
cd9d16
Content-Type: text/plain; charset=UTF-8
cd9d16
Content-Transfer-Encoding: 8bit
cd9d16
cd9d16
Add a missing 'break' statement to fix a buffer overrun when
cd9d16
executing the EEPROM write-all command. Spotted by Coverity
cd9d16
(see bug 887883).
cd9d16
cd9d16
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
cd9d16
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
cd9d16
(cherry picked from commit 0e3b800e71cb7759d099eabbd8ad4c4fe848e381)
cd9d16
cd9d16
Signed-off-by: Bruce Rogers <brogers@suse.com>
cd9d16
Signed-off-by: Andreas Färber <afaerber@suse.de>
cd9d16
---
cd9d16
 hw/lan9118.c | 1 +
cd9d16
 1 file changed, 1 insertion(+)
cd9d16
cd9d16
diff --git a/hw/lan9118.c b/hw/lan9118.c
cd9d16
index 73a8661..494b11d 100644
cd9d16
--- a/hw/lan9118.c
cd9d16
+++ b/hw/lan9118.c
cd9d16
@@ -863,6 +863,7 @@ static void lan9118_eeprom_cmd(lan9118_state *s, int cmd, int addr)
cd9d16
         } else {
cd9d16
             DPRINTF("EEPROM Write All (ignored)\n");
cd9d16
         }
cd9d16
+        break;
cd9d16
     case 5: /* ERASE */
cd9d16
         if (s->eeprom_writable) {
cd9d16
             s->eeprom[addr] = 0xff;
cd9d16
-- 
cd9d16
1.7.11.2
cd9d16