hw/pflash_cfi01.c
PATCH 1/1 hw/pflash_cfi01.c
Patch to catch wrong/unknown command sequences.
Index: hw/pflash_cfi01.c
===================================================================
RCS file: /sources/qemu/qemu/hw/pflash_cfi01.c,v
retrieving revision 1.2
pflash_cfi01.c +6 -1
@@ -353,6 +353,8 @@ pfl->counter--;break ; +default : + goto error_flash; }return ;case 3 :/* Confirm mode */
@@ -361,11 +363,14 @@if (cmd ==0xd0 ) { pfl->wcycle =0 ; pfl->status |=0x80 ; -break ; }else {DPRINTF ("%s: unknown command for \"write block\"\n" , __func__);PFLASH_BUG ("Write block confirm" ); + goto reset_flash; } +break ; +default : + goto error_flash; }return ;default :