qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] hw/lan9118.c: Add missing 'break' to fix buffer overrun
@ 2011-11-09 18:59 Peter Maydell
  2011-11-10 11:34 ` [Qemu-trivial] [Qemu-devel] " Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2011-11-09 18:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, patches

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>
---
 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.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PATCH] hw/lan9118.c: Add missing 'break' to fix buffer overrun
  2011-11-09 18:59 [Qemu-trivial] [PATCH] hw/lan9118.c: Add missing 'break' to fix buffer overrun Peter Maydell
@ 2011-11-10 11:34 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2011-11-10 11:34 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-trivial, qemu-devel, patches

On Wed, Nov 09, 2011 at 06:59:54PM +0000, Peter Maydell wrote:
> 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>
> ---
>  hw/lan9118.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Stefan


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-10 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-09 18:59 [Qemu-trivial] [PATCH] hw/lan9118.c: Add missing 'break' to fix buffer overrun Peter Maydell
2011-11-10 11:34 ` [Qemu-trivial] [Qemu-devel] " Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).