diff options
author | Igor Mammedov <imammedo@redhat.com> | 2013-05-30 17:09:34 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-06-10 23:33:18 +0200 |
commit | 8de433cb0820dc1f387a2d580d255744aacd60cc (patch) | |
tree | 7a3e5952003f3ef815bdaa57fddcc2cdd3c189bd /target-i386 | |
parent | 88f62c2b1deb466749e340a8a241975c509bd9b6 (diff) |
pc: Fix crash when attempting to hotplug CPU with negative ID
QMP command "{ 'execute': 'cpu-add', 'arguments': { 'id': -1 }}" may cause
QEMU SIGSEGV at:
piix4_cpu_hotplug_req ()
...
g->sts[cpu_id / 8] |= (1 << (cpu_id % 8));
...
Since for PC in current implementation id should be in range [0...maxcpus)
and maxcpus is already checked, add check for lower bound and error out
on incorrect value.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-i386')
0 files changed, 0 insertions, 0 deletions