[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/15] spapr: fix possible Negative array index read
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 11/15] spapr: fix possible Negative array index read |
Date: |
Thu, 7 Apr 2016 18:50:41 +0200 |
From: Gonglei <address@hidden>
fix CID 1351391.
Signed-off-by: Gonglei <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/ppc/spapr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index e7be21e..feaab08 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2208,6 +2208,10 @@ static void spapr_machine_device_plug(HotplugHandler
*hotplug_dev,
if (*errp) {
return;
}
+ if (node < 0 || node >= MAX_NODES) {
+ error_setg(errp, "Invaild node %d", node);
+ return;
+ }
/*
* Currently PowerPC kernel doesn't allow hot-adding memory to
--
2.5.5
- [Qemu-devel] [PULL 02/15] hw/timer: Revert "hpet: inverse polarity when pin above ISA_NUM_IRQS", (continued)
- [Qemu-devel] [PULL 02/15] hw/timer: Revert "hpet: inverse polarity when pin above ISA_NUM_IRQS", Paolo Bonzini, 2016/04/07
- [Qemu-devel] [PULL 03/15] docs: fix typo in memory.txt, Paolo Bonzini, 2016/04/07
- [Qemu-devel] [PULL 04/15] nbd: Return correct error for write to read-only export, Paolo Bonzini, 2016/04/07
- [Qemu-devel] [PULL 05/15] nbd: Avoid bitrot in TRACE() usage, Paolo Bonzini, 2016/04/07
- [Qemu-devel] [PULL 06/15] nbd: Improve debug traces on little-endian, Paolo Bonzini, 2016/04/07
- [Qemu-devel] [PULL 07/15] qemu-nbd: Document -x option, Paolo Bonzini, 2016/04/07
- [Qemu-devel] [PULL 08/15] nbd: Fix NBD unsupported options, Paolo Bonzini, 2016/04/07
- [Qemu-devel] [PULL 09/15] nbd: Don't kill server when client requests unknown option, Paolo Bonzini, 2016/04/07
- [Qemu-devel] [PULL 10/15] nbd: do not hang nbd_wr_syncv if outside a coroutine and no available data, Paolo Bonzini, 2016/04/07
- [Qemu-devel] [PULL 11/15] spapr: fix possible Negative array index read,
Paolo Bonzini <=
- [Qemu-devel] [PULL 13/15] translate-all: add missing fold of tb_ctx into tcg_ctx, Paolo Bonzini, 2016/04/07
- [Qemu-devel] [PULL 12/15] hostmem-file: fix memory leak, Paolo Bonzini, 2016/04/07
- [Qemu-devel] [PULL 14/15] tests: ignore test-logging, Paolo Bonzini, 2016/04/07
- [Qemu-devel] [PULL 15/15] target-i386: check for PKU even for non-writable pages, Paolo Bonzini, 2016/04/07