From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROTsG-0003gT-GF for qemu-devel@nongnu.org; Thu, 10 Nov 2011 07:37:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROTsF-0005v1-8Q for qemu-devel@nongnu.org; Thu, 10 Nov 2011 07:36:56 -0500 Received: from mtagate7.uk.ibm.com ([194.196.100.167]:60724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROTsF-0005uq-04 for qemu-devel@nongnu.org; Thu, 10 Nov 2011 07:36:55 -0500 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate7.uk.ibm.com (8.13.1/8.13.1) with ESMTP id pAACarHN027829 for ; Thu, 10 Nov 2011 12:36:53 GMT Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAACartt2359440 for ; Thu, 10 Nov 2011 12:36:53 GMT Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAACapWw023725 for ; Thu, 10 Nov 2011 05:36:51 -0700 From: Stefan Hajnoczi Date: Thu, 10 Nov 2011 12:36:44 +0000 Message-Id: <1320928604-6642-9-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1320928604-6642-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1320928604-6642-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 8/8] hw/lan9118.c: Add missing 'break' to fix buffer overrun List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Anthony Liguori , Stefan Hajnoczi From: Peter Maydell 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 Signed-off-by: Stefan Hajnoczi --- 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.7.1