New Defects reported by Coverity Scan for libvirt
scan-admin at coverity.com
scan-admin at coverity.com
Wed Jan 18 05:41:10 UTC 2023
Hi,
Please find the latest report on new defect(s) introduced to libvirt found with Coverity Scan.
1 new defect(s) introduced to libvirt found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 404444: Integer handling issues (DIVIDE_BY_ZERO)
/src/remote/remote_driver.c: 2759 in remoteDomainGetCPUStats()
________________________________________________________________________________________________________
*** CID 404444: Integer handling issues (DIVIDE_BY_ZERO)
/src/remote/remote_driver.c: 2759 in remoteDomainGetCPUStats()
2753
2754 /* The remote side did not send back any zero entries, so we have
2755 * to expand things back into a possibly sparse array, where the
2756 * tail of the array may be omitted.
2757 */
2758 memset(params, 0, sizeof(*params) * nparams * ncpus);
>>> CID 404444: Integer handling issues (DIVIDE_BY_ZERO)
>>> In expression "ret.params.params_len / ret.nparams", division by expression "ret.nparams" which may be zero has undefined behavior.
2759 ncpus = ret.params.params_len / ret.nparams;
2760 for (cpu = 0; cpu < ncpus; cpu++) {
2761 int tmp = nparams;
2762 virTypedParameterPtr cpu_params = ¶ms[cpu * nparams];
2763 remote_typed_param *stride = &ret.params.params_val[cpu * ret.nparams];
2764
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yqXyKjvBooc6PgQklkMPQjdETL0zD-2BwwS2MT3CUz0PGk4uLnDSo8-2B2mZ3lSeSytwjA-3DvbKZ_CkO38-2FnXVYPAlDbR1ZxdHNqvqoSWeUuqu9763V-2FVMwz615jE5kHjopZrTZifvEhBnTLKhX7LELu-2BNVx-2BCScGDq2g-2BbrHA6VFneqSkzKKGml99pDwgxM7qqh0df2dZFfgTJ-2B5WRI-2BNCCWvcKEYXyY-2BFWDM4MZ2H2-2Fg4uULDbZ1G-2BzcszalAlG5KeKr4vB-2F1B3stC1BOXO7vPV5pe-2FY4cRCg-3D-3D
More information about the Libvirt-ci
mailing list