mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
GetCPUStats: fix overflow test
Bug introduced in commit c6ec021b. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
This commit is contained in:
parent
42043afcdc
commit
f9f2d3b100
@ -18541,7 +18541,7 @@ int virDomainGetCPUStats(virDomainPtr domain,
|
|||||||
(start_cpu == -1 && ncpus != 1) ||
|
(start_cpu == -1 && ncpus != 1) ||
|
||||||
((params == NULL) != (nparams == 0)) ||
|
((params == NULL) != (nparams == 0)) ||
|
||||||
(ncpus == 0 && params != NULL) ||
|
(ncpus == 0 && params != NULL) ||
|
||||||
ncpus < UINT_MAX / nparams) {
|
(nparams && ncpus > UINT_MAX / nparams)) {
|
||||||
virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
|
virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user