diff options
author | Igor Mammedov <imammedo@redhat.com> | 2013-05-30 17:09:34 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2013-06-17 18:01:42 -0500 |
commit | 75e4aa9405d7824bc5b26c0c10d5bab7fd697d2e (patch) | |
tree | 8582621f538025234b17f0543aa3d691892e109a /tests/test-string-output-visitor.c | |
parent | 055a7fce6513a67ecb7db06f808013faa916327e (diff) | |
download | qemu-75e4aa9405d7824bc5b26c0c10d5bab7fd697d2e.zip qemu-75e4aa9405d7824bc5b26c0c10d5bab7fd697d2e.tar.gz qemu-75e4aa9405d7824bc5b26c0c10d5bab7fd697d2e.tar.bz2 |
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>
(cherry picked from commit 8de433cb0820dc1f387a2d580d255744aacd60cc)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'tests/test-string-output-visitor.c')
0 files changed, 0 insertions, 0 deletions