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.
13 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 404496: Code maintainability issues (UNUSED_VALUE)
/src/vbox/vbox_common.c: 1264 in vboxAttachDrives()
________________________________________________________________________________________________________
*** CID 404496: Code maintainability issues (UNUSED_VALUE)
/src/vbox/vbox_common.c: 1264 in vboxAttachDrives()
1258 /* The following is not needed for vbox 4.2+ but older versions have
1259 * distinct find and open operations where the former looks in vbox
1260 * media registry while the latter at storage location. In 4.2+, the
1261 * OpenMedium call takes care of both cases internally
1262 */
1263 if (!medium) {
>>> CID 404496: Code maintainability issues (UNUSED_VALUE)
>>> Assigning value from "gVBoxAPI.UIVirtualBox.OpenMedium(data->vboxObj, mediumFileUtf16, deviceType, accessMode, &medium)" to "rc" here, but that stored value is overwritten before it can be used.
1264 rc = gVBoxAPI.UIVirtualBox.OpenMedium(data->vboxObj,
1265 mediumFileUtf16,
1266 deviceType, accessMode,
1267 &medium);
1268 }
1269
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my...
1 year, 11 months
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 404482: Control flow issues (DEADCODE)
/src/rpc/virnetsshsession.c: 716 in virNetSSHAuthenticatePassword()
________________________________________________________________________________________________________
*** CID 404482: Control flow issues (DEADCODE)
/src/rpc/virnetsshsession.c: 716 in virNetSSHAuthenticatePassword()
710 libssh2_session_last_error(sess->session, &errmsg, NULL, 0);
711 virReportError(VIR_ERR_AUTH_FAILED,
712 _("authentication failed: %s"), errmsg);
713
714 /* determine exist status */
715 if (rc == LIBSSH2_ERROR_AUTHENTICATION_FAILED)
>>> CID 404482: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "ret = 1;".
716 ret = 1;
717 else
718 ret = -1;
719
720 cleanup:
721 VIR_FREE(password);
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my...
1 year, 11 months
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 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-2F2Czv4BOaCWWCy7my...
1 year, 11 months
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.
2 new defect(s) introduced to libvirt found with Coverity Scan.
1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 404360: Null pointer dereferences (REVERSE_INULL)
/src/qemu/qemu_passt.c: 278 in qemuPasstStart()
________________________________________________________________________________________________________
*** CID 404360: Null pointer dereferences (REVERSE_INULL)
/src/qemu/qemu_passt.c: 278 in qemuPasstStart()
272 return 0;
273
274 error:
275 ignore_value(virPidFileReadPathIfLocked(pidfile, &pid));
276 if (pid != -1)
277 virProcessKillPainfully(pid, true);
>>> CID 404360: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "pidfile" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
278 if (pidfile)
279 unlink(pidfile);
280
281 return -1;
** CID 404359: Null pointer dereferences (FORWARD_NULL)
/src/conf/domain_conf.c: 2635 in virDomainNetPortForwardFree()
________________________________________________________________________________________________________
*** CID 404359: Null pointer dereferences (FORWARD_NULL)
/src/conf/domain_conf.c: 2635 in virDomainNetPortForwardFree()
2629 {
2630 size_t i;
2631
2632 if (pf)
2633 g_free(pf->dev);
2634
>>> CID 404359: Null pointer dereferences (FORWARD_NULL)
>>> Dereferencing null pointer "pf".
2635 for (i = 0; i < pf->nRanges; i++)
2636 g_free(pf->ranges[i]);
2637
2638 g_free(pf->ranges);
2639 g_free(pf);
2640 }
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my...
1 year, 11 months
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.
2 new defect(s) introduced to libvirt found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 404348: Resource leaks (RESOURCE_LEAK)
/src/remote/remote_daemon_dispatch.c: 7484 in remoteDispatchDomainFdAssociate()
________________________________________________________________________________________________________
*** CID 404348: Resource leaks (RESOURCE_LEAK)
/src/remote/remote_daemon_dispatch.c: 7484 in remoteDispatchDomainFdAssociate()
7478 rv = 0;
7479
7480 cleanup:
7481 if (rv < 0)
7482 virNetMessageSaveError(rerr);
7483 virObjectUnref(dom);
>>> CID 404348: Resource leaks (RESOURCE_LEAK)
>>> Variable "fds" going out of scope leaks the storage it points to.
7484 return rv;
** CID 404347: Null pointer dereferences (NULL_RETURNS)
/src/qemu/qemu_snapshot.c: 2472 in qemuSnapshotUpdateDisksSingle()
________________________________________________________________________________________________________
*** CID 404347: Null pointer dereferences (NULL_RETURNS)
/src/qemu/qemu_snapshot.c: 2472 in qemuSnapshotUpdateDisksSingle()
2466 if (virStorageSourceIsSameLocation(snapDisk->src, disk->src)) {
2467 virObjectUnref(disk->src);
2468 disk->src = virStorageSourceCopy(parentDisk->src, false);
2469 }
2470 }
2471
>>> CID 404347: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing "disk->src", which is known to be "NULL".
2472 if (disk->src->backingStore) {
2473 virStorageSource *cur = disk->src;
2474 virStorageSource *next = disk->src->backingStore;
2475
2476 while (next) {
2477 if (virStorageSourceIsSameLocation(snapDisk->src, next)) {
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my...
1 year, 11 months