* [Qemu-devel] [parch] Incorrect IO index overflow check
@ 2005-10-29 20:29 Paul Brook
0 siblings, 0 replies; only message in thread
From: Paul Brook @ 2005-10-29 20:29 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 87 bytes --]
The attached patch fixes an incorrect overflow check in
cpu_register_io_memory.
Paul
[-- Attachment #2: patch.qemu_io_overflow --]
[-- Type: text/x-diff, Size: 742 bytes --]
Index: exec.c
===================================================================
RCS file: /cvsroot/qemu/qemu/exec.c,v
retrieving revision 1.65
diff -u -p -r1.65 exec.c
--- exec.c 3 Sep 2005 10:49:04 -0000 1.65
+++ exec.c 29 Oct 2005 20:25:10 -0000
@@ -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];
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-10-29 20:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-29 20:29 [Qemu-devel] [parch] Incorrect IO index overflow check Paul Brook
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.