New Defects reported by Coverity Scan for libvirt
scan-admin at coverity.com
scan-admin at coverity.com
Tue Jan 5 08:43:14 UTC 2021
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 308307: Incorrect expression (EVALUATION_ORDER)
/src/network/bridge_driver.c: 4158 in networkGetDHCPLeases()
________________________________________________________________________________________________________
*** CID 308307: Incorrect expression (EVALUATION_ORDER)
/src/network/bridge_driver.c: 4158 in networkGetDHCPLeases()
4152 /* Unlike IPv4, IPv6 uses ':' instead of '.' as separator */
4153 ipv6 = strchr(ip_tmp, ':') ? true : false;
4154 lease->type = ipv6 ? VIR_IP_ADDR_TYPE_IPV6 : VIR_IP_ADDR_TYPE_IPV4;
4155
4156 /* Obtain prefix */
4157 for (j = 0; j < def->nips; j++) {
>>> CID 308307: Incorrect expression (EVALUATION_ORDER)
>>> In "ipdef_tmp = ipdef_tmp = &def->ips[j]", "ipdef_tmp" is written twice with the same value.
4158 virNetworkIPDefPtr ipdef_tmp = ipdef_tmp = &def->ips[j];
4159
4160 if (ipv6 && VIR_SOCKET_ADDR_IS_FAMILY(&ipdef_tmp->address,
4161 AF_INET6)) {
4162 lease->prefix = ipdef_tmp->prefix;
4163 break;
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yqXyKjvBooc6PgQklkMPQjdETL0zD-2BwwS2MT3CUz0PGk4uLnDSo8-2B2mZ3lSeSytwjA-3DNAig_CkO38-2FnXVYPAlDbR1ZxdHNqvqoSWeUuqu9763V-2FVMwwOu6hSGh5EHwi-2BGZV-2BqBIq8lspBbqWK-2BgiVfVQTlSIaReai81ccwgJPK0Hxf-2F-2FveCkkDcw4LiHvJb0KicubE8yghlTxTQZhpev22YaSem7t9c6dZ4bXm-2Bxet0IsSzWfaqaCt3mEZdL8tQbW97xfXTDJc0kgc0AuKwpxR3-2Br01LDBl09gsUy7oK-2Boy-2BbYfaMHk-3D
More information about the Libvirt-ci
mailing list