mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
spapr: fix possible Negative array index read
fix CID 1351391. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Message-Id: <1456998223-12356-6-git-send-email-arei.gonglei@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
dacca04c8d
commit
1a5512bb7e
1 changed files with 4 additions and 0 deletions
|
@ -2208,6 +2208,10 @@ static void spapr_machine_device_plug(HotplugHandler *hotplug_dev,
|
||||||
if (*errp) {
|
if (*errp) {
|
||||||
return;
|
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
|
* Currently PowerPC kernel doesn't allow hot-adding memory to
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue