提交 68ee703b 编写于 作者: P Peter Krempa

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.
上级 b3c91b8a
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册