New Defects reported by Coverity Scan for libvirt

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-2F2Czv4BOaCWWCy7my0P0...
participants (1)
-
scan-admin@coverity.com