New Defects reported by Coverity Scan for libvirt
by scan-admin@coverity.com
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 469679: (OVERFLOW_BEFORE_WIDEN)
/src/qemu/qemu_chardev.c: 250 in qemuChardevGetBackendProps()
/src/qemu/qemu_chardev.c: 295 in qemuChardevGetBackendProps()
________________________________________________________________________________________________________
*** CID 469679: (OVERFLOW_BEFORE_WIDEN)
/src/qemu/qemu_chardev.c: 250 in qemuChardevGetBackendProps()
244 else if (chr->data.nix.reconnect.enabled == VIR_TRISTATE_BOOL_NO)
245 reconnect = 0;
246 }
247
248 if (reconnect != -1 &&
249 virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV_RECONNECT_MILISECONDS)) {
>>> CID 469679: (OVERFLOW_BEFORE_WIDEN)
>>> Potentially overflowing expression "reconnect * 1000" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "long long" (64 bits, signed).
250 reconnect_ms = reconnect * 1000;
251 reconnect = -1;
252 }
253
254 if (virJSONValueObjectAdd(props,
255 "T:server", server,
/src/qemu/qemu_chardev.c: 295 in qemuChardevGetBackendProps()
289 reconnect = chr->data.tcp.reconnect.timeout;
290 else if (chr->data.tcp.reconnect.enabled == VIR_TRISTATE_BOOL_NO)
291 reconnect = 0;
292
293 if (reconnect != -1 &&
294 virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV_RECONNECT_MILISECONDS)) {
>>> CID 469679: (OVERFLOW_BEFORE_WIDEN)
>>> Potentially overflowing expression "reconnect * 1000" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "long long" (64 bits, signed).
295 reconnect_ms = reconnect * 1000;
296 reconnect = -1;
297 }
298
299 if (qemuChardevBackendAddSocketAddressInet(props, "addr",
300 commandline, NULL,
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy...