Incorrect IO index overflow check
The attached patch fixes an incorrect overflow check in cpu_register_io_memory.
Paul
Index: exec.c
===================================================================
RCS file: /cvsroot/qemu/qemu/exec.c,v
retrieving revision 1.65
exec.c +3 -6
@@ -2095,14 +2095,11 @@ int cpu_register_io_memory(int io_index,int i;if (io_index <=0 ) { -if (io_index >=IO_MEM_NB_ENTRIES ) -return -1 ; io_index = io_mem_nb++; - }else { -if (io_index >=IO_MEM_NB_ENTRIES ) -return -1 ; } - +if (io_index >=IO_MEM_NB_ENTRIES ) +return -1 ; +for (i =0 ;i <3 ; i++) { io_mem_read[io_index][i] = mem_read[i]; io_mem_write[io_index][i] = mem_write[i];