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 467933: Control flow issues (DEADCODE)
/src/ch/ch_interface.c: 112 in virCHConnetNetworkInterfaces()
________________________________________________________________________________________________________
*** CID 467933: Control flow issues (DEADCODE)
/src/ch/ch_interface.c: 112 in virCHConnetNetworkInterfaces()
106 default:
107 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
108 _("Unsupported Network type %1$d"), actualType);
109 return -1;
110 }
111
>>> CID 467933: Control flow issues (DEADCODE)
>>> Execution cannot reach the expression "actualType == VIR_DOMAIN_NET_TYPE_BRIDGE" inside this statement: "if (actualType == VIR_DOMAI...".
112 if (actualType == VIR_DOMAIN_NET_TYPE_ETHERNET ||
113 actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||
114 actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||
115 actualType == VIR_DOMAIN_NET_TYPE_DIRECT) {
116 if (nicindexes && nnicindexes && net->ifname) {
117 int nicindex = 0;
** CID 467932: Insecure data handling (TAINTED_SCALAR)
/src/hypervisor/domain_interface.c: 596 in virDomainCreateInBridgePortWithHelper()
________________________________________________________________________________________________________
*** CID 467932: Insecure data handling (TAINTED_SCALAR)
/src/hypervisor/domain_interface.c: 596 in virDomainCreateInBridgePortWithHelper()
590 *tapfd = -1;
591 goto cleanup;
592 }
593
594 do {
595 *tapfd = virSocketRecvFD(pair[0], 0);
>>> CID 467932: Insecure data handling (TAINTED_SCALAR)
>>> Using tainted variable "*tapfd" as a loop boundary.
596 } while (*tapfd < 0 && errno == EINTR);
597
598 if (*tapfd < 0) {
599 char *errstr = NULL;
600
601 if (!(cmdstr = virCommandToString(cmd, false)))
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy...