mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
vz: Fix invalid iteration of def->cputune.vcpupin
The array doesn't necessarily have the same cardinality as the count of vCPUs for a domain. Iterating it can cause access beyond the end of the array.
This commit is contained in:
parent
b3c91b8a50
commit
68ee703bfe
@ -1958,7 +1958,7 @@ prlsdkCheckUnsupportedParams(PRL_HANDLE sdkdom, virDomainDefPtr def)
|
||||
}
|
||||
|
||||
if (def->cputune.vcpupin) {
|
||||
for (i = 0; i < virDomainDefGetVcpus(def); i++) {
|
||||
for (i = 0; i < def->cputune.nvcpupin; i++) {
|
||||
if (!virBitmapEqual(def->cpumask,
|
||||
def->cputune.vcpupin[i]->cpumask)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
|
Loading…
x
Reference in New Issue
Block a user