projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eefaccc
)
Openpic: check that cpu id is within the number of cpus
author
Fabien Chouteau
<chouteau@adacore.com>
Wed, 25 Feb 2015 09:50:28 +0000
(10:50 +0100)
committer
Alexander Graf
<agraf@suse.de>
Mon, 9 Mar 2015 14:00:03 +0000
(15:00 +0100)
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/intc/openpic.c
patch
|
blob
|
history
diff --git
a/hw/intc/openpic.c
b/hw/intc/openpic.c
index 7d1f3b9497279e5e5cfa9bad1475cef7ac56f30e..305377d899298acb99b95417f3036c63d45d5a17 100644
(file)
--- a/
hw/intc/openpic.c
+++ b/
hw/intc/openpic.c
@@
-1013,7
+1013,7
@@
static void openpic_cpu_write_internal(void *opaque, hwaddr addr,
DPRINTF("%s: cpu %d addr %#" HWADDR_PRIx " <= 0x%08x\n", __func__, idx,
addr, val);
- if (idx < 0) {
+ if (idx < 0
|| idx >= opp->nb_cpus
) {
return;
}
@@
-1152,7
+1152,7
@@
static uint32_t openpic_cpu_read_internal(void *opaque, hwaddr addr,
DPRINTF("%s: cpu %d addr %#" HWADDR_PRIx "\n", __func__, idx, addr);
retval = 0xFFFFFFFF;
- if (idx < 0) {
+ if (idx < 0
|| idx >= opp->nb_cpus
) {
return retval;
}