mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-pull-request' into staging
cpu: crash fix (don't allow negative core id) # gpg: Signature made Thu 03 Aug 2017 18:57:41 BST # gpg: using RSA key 0x2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/machine-pull-request: cpu: don't allow negative core id Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -33,6 +33,11 @@ static void core_prop_set_core_id(Object *obj, Visitor *v, const char *name,
|
||||
return;
|
||||
}
|
||||
|
||||
if (value < 0) {
|
||||
error_setg(errp, "Invalid core id %"PRId64, value);
|
||||
return;
|
||||
}
|
||||
|
||||
core->core_id = value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user