iscsi-initiator-utils-6.2.1.9-21.gita65a472.fc41

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/config.h:28: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/mgmt_ipc.h:24: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.h:31: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/idbm.h:28: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c:27: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c: scope_hint: In function ‘iscsid_reqs_close’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:15:46: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*tmp.list.next’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:39:9: note: in expansion of macro ‘list_container_of’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:59:27: note: in expansion of macro ‘list_entry’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c:68:9: note: in expansion of macro ‘list_for_each_entry_safe’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c:68:9: note: in expansion of macro ‘list_for_each_entry_safe’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:39:9: note: in expansion of macro ‘list_container_of’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:59:27: note: in expansion of macro ‘list_entry’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c:68:9: note: in expansion of macro ‘list_for_each_entry_safe’
#   13|   
#   14|   #define list_container_of(ptr, type, member) ({		\
#   15|->         const typeof( ((type *)0)->member ) *__mptr = (ptr);	\
#   16|           (type *)( (char *)__mptr - offsetof(type,member) );})
#   17|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def2]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/config.h:28: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/mgmt_ipc.h:24: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.h:31: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:36: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c: scope_hint: In function ‘main’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:15:46: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*tmp_iface.list.next’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:39:9: note: in expansion of macro ‘list_container_of’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:59:27: note: in expansion of macro ‘list_entry’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:4137:9: note: in expansion of macro ‘list_for_each_entry_safe’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:25:26: note: in definition of macro ‘LIST_HEAD’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:4137:9: note: in expansion of macro ‘list_for_each_entry_safe’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c: scope_hint: In function ‘main’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:39:9: note: in expansion of macro ‘list_container_of’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:59:27: note: in expansion of macro ‘list_entry’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:4137:9: note: in expansion of macro ‘list_for_each_entry_safe’
#   13|   
#   14|   #define list_container_of(ptr, type, member) ({		\
#   15|->         const typeof( ((type *)0)->member ) *__mptr = (ptr);	\
#   16|           (type *)( (char *)__mptr - offsetof(type,member) );})
#   17|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:68:20: warning[-Wanalyzer-malloc-leak]: leak of ‘isns_create_node(&*iface.iname)’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/discoveryd.c: scope_hint: In function ‘isns_create_node_list’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/discoveryd.c:814:9: note: in expansion of macro ‘list_for_each_entry’
#   66|   	new->next = next;
#   67|   	new->prev = prev;
#   68|-> 	prev->next = new;
#   69|   }
#   70|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:68:20: warning[-Wanalyzer-malloc-leak]: leak of ‘isns_create_node(def_iname)’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/discoveryd.c: scope_hint: In function ‘isns_create_node_list’
#   66|   	new->next = next;
#   67|   	new->prev = prev;
#   68|-> 	prev->next = new;
#   69|   }
#   70|   

Error: CPPCHECK_WARNING: [#def5]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/ipv6.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-119): [#def6]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/ipv6.c:132: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: (char*)dest_mac->addr
#  130|   	for (i = 0; i < MAX_MCADDR_TABLE; i++, mc_addr++)
#  131|   		if (!memcmp((char *)mc_addr,
#  132|-> 			    (char *)dest_mac->addr, sizeof(struct mac_address)))
#  133|   			return TRUE;
#  134|   	return FALSE;

Error: CLANG_WARNING: [#def7]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/ipv6.c:863:2: warning[deadcode.DeadStores]: Value stored to 'icmp_opt' is never read
#  861|   		  sizeof(struct icmpv6_router_advert);
#  862|   
#  863|-> 	icmp_opt = (struct icmpv6_opt_hdr *)((u8_t *)icmp +
#  864|   				      sizeof(struct icmpv6_router_advert));
#  865|   	len = 0;

Error: CPPCHECK_WARNING: [#def8]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/psock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def9]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip-neighbor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-465): [#def10]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip-neighbor.c: scope_hint: In function ‘uip_neighbor_out’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip-neighbor.c:197:51: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct uip_ipv6_hdr’ may result in an unaligned pointer value
#  197 |         e = find_entry(ustack, (struct in6_addr *)ipv6_hdr->destipaddr);
#      |                                                   ^~~~~~~~
#  195|   	   If not ARP table entry is found, we overwrite the original IP
#  196|   	   packet with an ARP request for the IP address. */
#  197|-> 	e = find_entry(ustack, (struct in6_addr *)ipv6_hdr->destipaddr);
#  198|   	if (e == NULL) {
#  199|   		struct uip_eth_addr eth_addr_tmp;

Error: CPPCHECK_WARNING: [#def11]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def12]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c:1546:24: warning[core.NullDereference]: Array access (via field 'len') results in a null pointer dereference
# 1544|   		goto ip_send_nolen;
# 1545|   	} else {
# 1546|-> 		tcp_ipv4_hdr->len[0] = (ustack->uip_len >> 8);
# 1547|   		tcp_ipv4_hdr->len[1] = (ustack->uip_len & 0xff);
# 1548|   		tcp_ipv4_hdr->ttl = ustack->uip_udp_conn->ttl;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c: scope_hint: In function ‘uip_process’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c:1548:35: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tcp_ipv4_hdr’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c: scope_hint: In function ‘uip_process’
# 1546|   		tcp_ipv4_hdr->len[0] = (ustack->uip_len >> 8);
# 1547|   		tcp_ipv4_hdr->len[1] = (ustack->uip_len & 0xff);
# 1548|-> 		tcp_ipv4_hdr->ttl = ustack->uip_udp_conn->ttl;
# 1549|   		tcp_ipv4_hdr->proto = UIP_PROTO_UDP;
# 1550|   	}

Error: CPPCHECK_WARNING (CWE-119): [#def14]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c:1601: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: uip_connr->ripaddr
# 1599|   			    tcp_hdr->destport == uip_connr->lport &&
# 1600|   			    tcp_hdr->srcport == uip_connr->rport &&
# 1601|-> 			    uip_ip6addr_cmp(IPv6_BUF(ustack)->srcipaddr,
# 1602|   					    uip_connr->ripaddr)) {
# 1603|   				goto found;

Error: CPPCHECK_WARNING (CWE-119): [#def15]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c:1739: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: uip_connr->ripaddr
# 1737|   	uip_connr->rport = tcp_hdr->srcport;
# 1738|   	if (is_ipv6(ustack)) {
# 1739|-> 		uip_ip6addr_copy(uip_connr->ripaddr,
# 1740|   				 IPv6_BUF(ustack)->srcipaddr);
# 1741|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c:2328:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tcp_ipv4_hdr’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c: scope_hint: In function ‘uip_process’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c:6: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c:1096:25: note: in expansion of macro ‘uip_outstanding’
# 2326|   				 uip_connr->ripaddr6);
# 2327|   	} else {
# 2328|-> 		tcp_ipv4_hdr->proto = UIP_PROTO_TCP;
# 2329|   		uip_ip4addr_copy(tcp_ipv4_hdr->srcipaddr, ustack->hostaddr);
# 2330|   		uip_ip4addr_copy(tcp_ipv4_hdr->destipaddr, uip_connr->ripaddr);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c:2356:35: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tcp_ipv4_hdr’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c: scope_hint: In function ‘uip_process’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c:1096:25: note: in expansion of macro ‘uip_outstanding’
# 2354|   		    ((ustack->uip_len - uip_iph_len) & 0xff);
# 2355|   	} else {
# 2356|-> 		tcp_ipv4_hdr->ttl = UIP_TTL;
# 2357|   		tcp_ipv4_hdr->len[0] = (ustack->uip_len >> 8);
# 2358|   		tcp_ipv4_hdr->len[1] = (ustack->uip_len & 0xff);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c:2370:35: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tcp_ipv4_hdr’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c: scope_hint: In function ‘uip_process’
# 2368|   
# 2369|   	if (!is_ipv6(ustack)) {
# 2370|-> 		tcp_ipv4_hdr->vhl = 0x45;
# 2371|   		tcp_ipv4_hdr->tos = 0;
# 2372|   		tcp_ipv4_hdr->ipoffset[0] = tcp_ipv4_hdr->ipoffset[1] = 0;

Error: CLANG_WARNING: [#def19]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip.c:2389:7: warning[core.NullDereference]: Array access (via field 'len') results in a null pointer dereference
# 2387|   		ILOG_DEBUG(PFX "Sending packet with length %d (%d)",
# 2388|   			  ustack->uip_len,
# 2389|-> 			  (tcp_ipv4_hdr->len[0] << 8) | tcp_ipv4_hdr->len[1]);
# 2390|   	}
# 2391|   	++ustack->stats.ip.sent;

Error: CPPCHECK_WARNING: [#def20]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip_arp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-465): [#def21]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip_arp.c: scope_hint: In function ‘uip_arp_ipin’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip_arp.c:219:34: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct ip_hdr’ may result in an unaligned pointer value
#  217|   		   table, since it is likely that we will do more communication
#  218|   		   with this host in the future. */
#  219|-> 		uip_arp_update(ip->srcipaddr, &eth->src);
#  220|   	}
#  221|   }

Error: COMPILER_WARNING (CWE-465): [#def22]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip_arp.c: scope_hint: In function ‘uip_arp_arpin’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip_arp.c:247:43: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct arp_hdr’ may result in an unaligned pointer value
#  245|   			   our ARP table, since it is likely that we will do
#  246|   			   more communication with this host in the future. */
#  247|-> 			uip_arp_update(arp->sipaddr, &arp->shwaddr);
#  248|   
#  249|   			/* The reply opcode is 2. */

Error: COMPILER_WARNING (CWE-465): [#def23]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/uip/uip_arp.c:273:35: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct arp_hdr’ may result in an unaligned pointer value
#  271|   		break;
#  272|   	case const_htons(ARP_REPLY):
#  273|-> 		uip_arp_update(arp->sipaddr, &arp->shwaddr);
#  274|   		break;
#  275|   	default:

Error: CPPCHECK_WARNING: [#def24]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-697): [#def25]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c: scope_hint: In function ‘decode_iface’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c:272:29: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘__u6_addr8’ will never be NULL
#  272 |                         if (!ird->ipv6_subnet_mask.s6_addr)
#      |                             ^
/usr/include/arpa/inet.h:22: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c:48: included_from: Included from here.
/usr/include/netinet/in.h:225:17: note: ‘__u6_addr8’ declared here
#  225 |         uint8_t __u6_addr8[16];
#      |                 ^~~~~~~~~~
#  270|   				       sizeof(struct in6_addr));
#  271|   			/* Subnet mask priority: CIDR, then rec */
#  272|-> 			if (!ird->ipv6_subnet_mask.s6_addr)
#  273|   				inet_pton(AF_INET6, rec->subnet_mask,
#  274|   					  &ird->ipv6_subnet_mask);

Error: CLANG_WARNING: [#def26]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c:330:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  328|   	if ((datalen > STD_MTU_SIZE) || (datalen < 0)) {
#  329|   		ILOG_ERR(PFX "Ping datalen invalid: %d", datalen);
#  330|-> 		rc = -EINVAL;
#  331|   		goto ping_done;
#  332|   	}

Error: CPPCHECK_WARNING: [#def27]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/libs/bnx2.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def28]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/libs/bnx2x.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def29]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/libs/cnic.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def30]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/libs/cnic.c:394:5: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  392|   			for (count = 0; count < 8; count++) {
#  393|   				/* Convert from timeval to timespec */
#  394|-> 				rc = gettimeofday(&tp, NULL);
#  395|   
#  396|   				timeradd(&tp, &tp_wait, &tp_abs);

Error: CPPCHECK_WARNING: [#def31]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/libs/qedi.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def32]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/libs/qedi.c:685:6: warning[core.NullDereference]: Access to field 'bufs' results in a dereference of a null pointer (loaded from variable 'bp')
#  683|   open_error:
#  684|   
#  685|-> 	if (bp->bufs) {
#  686|   		munmap(bp->bufs, (bp->rx_ring_size + 1) * bp->rx_buffer_size);
#  687|   		bp->bufs = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/libs/qedi.c: scope_hint: In function ‘qedi_open’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/libs/qedi.c:685:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bp’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/libs/qedi.c:68: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/libs/qedi.c:465:25: note: in expansion of macro ‘ILOG_WARN’
#  683|   open_error:
#  684|   
#  685|-> 	if (bp->bufs) {
#  686|   		munmap(bp->bufs, (bp->rx_ring_size + 1) * bp->rx_buffer_size);
#  687|   		bp->bufs = NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def34]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c:67: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c: scope_hint: In function ‘iscsid_init’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/logger.h:97:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘iscsid_opts.fd’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c:1194:17: note: in expansion of macro ‘ILOG_ERR’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c:1194:17: note: in expansion of macro ‘ILOG_ERR’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c:1194:17: note: in expansion of macro ‘ILOG_ERR’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c:42: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c:1194:17: note: in expansion of macro ‘ILOG_ERR’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/iscsid_ipc.c:1194:17: note: in expansion of macro ‘ILOG_ERR’
#   95|   #define ILOG_ERR(fmt, args...) \
#   96|   	do {if (LOG_LEVEL_ERR <= main_log.level) {\
#   97|-> 		log_uip(LOG_ERR,\
#   98|   			LOG_LEVEL_ERR_STR fmt,\
#   99|   			##args);\

Error: CPPCHECK_WARNING: [#def35]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def36]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_nl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def37]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_nl.c:608:11: warning[core.NullDereference]: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'ev')
#  606|   		/*  Try to abort ARP'ing if a if_down was received */
#  607|   		ev = (struct iscsi_uevent *)NLMSG_DATA(buf);
#  608|-> 		switch (ev->type) {
#  609|   		case ISCSI_KEVENT_IF_DOWN:
#  610|   			host_no = ev->r.notify_if_down.host_no;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_nl.c: scope_hint: In function ‘nic_nl_open’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_nl.c:608:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buf’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_nl.c:60: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_nl.c:594:9: note: in expansion of macro ‘ILOG_INFO’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_nl.c:50: included_from: Included from here.
#  606|   		/*  Try to abort ARP'ing if a if_down was received */
#  607|   		ev = (struct iscsi_uevent *)NLMSG_DATA(buf);
#  608|-> 		switch (ev->type) {
#  609|   		case ISCSI_KEVENT_IF_DOWN:
#  610|   			host_no = ev->r.notify_if_down.host_no;

Error: CLANG_WARNING: [#def39]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:220:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  218|   			char temp_path[sizeof(iscsi_host_path_netdev_template) +
#  219|   				       8];
#  220|-> 			rc = sscanf(files[i]->d_name, host_template, &host_no);
#  221|   			nic_t *nic;
#  222|   

Error: CLANG_WARNING: [#def40]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:238:9: warning[core.NullDereference]: Array access (from variable 'raw') results in a null pointer dereference
#  236|   			if (rc != 0) {
#  237|   				/*  Normalize the string */
#  238|-> 				if (raw[raw_size - 1] == '\n')
#  239|   					raw[raw_size - 1] = '\0';
#  240|   

Error: CLANG_WARNING: [#def41]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:247:6: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  245|   
#  246|   					free(raw);
#  247|-> 					rc = -ENOMEM;
#  248|   					break;
#  249|   				}

Error: CLANG_WARNING: [#def42]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:259:6: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  257|   					free(nic);
#  258|   					free(raw);
#  259|-> 					rc = -EIO;
#  260|   					continue;
#  261|   				}

Error: CLANG_WARNING: [#def43]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:412:9: warning[deadcode.DeadStores]: Value stored to 'current_nic' during its initialization is never read
#  410|   int from_host_no_find_associated_eth_device(int host_no, nic_t **nic)
#  411|   {
#  412|-> 	nic_t *current_nic = nic_list;
#  413|   	char *raw = NULL, *raw_tmp;
#  414|   	uint32_t raw_size = 0;

Error: CLANG_WARNING: [#def44]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:429:9: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'raw_tmp')
#  427|   	/* sanitize name string by replacing newline with null termination */
#  428|   	raw_tmp = raw;
#  429|-> 	while (*raw_tmp != '\n' && raw_size--)
#  430|   		raw_tmp++;
#  431|   	*raw_tmp = '\0';

Error: CLANG_WARNING: [#def45]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:759:8: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  757|   		}
#  758|   
#  759|-> 		if (!memcmp(host_pfx, nic->config_device_name,
#  760|   			    strlen(host_pfx))) {
#  761|   			rc = from_uio_find_associated_host(nic, uio_minor,

Error: CLANG_WARNING: [#def46]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:827:9: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'raw_tmp')
#  825|   	/* sanitize name string by replacing newline with null termination */
#  826|   	raw_tmp = raw;
#  827|-> 	while (*raw_tmp != '\n' && raw_size--)
#  828|   		raw_tmp++;
#  829|   	*raw_tmp = '\0';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c: scope_hint: In function ‘nic_verify_uio_sysfs_name’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:827:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘raw’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:55: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:1789:17: note: in expansion of macro ‘ILOG_ERR’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:1789:17: note: in expansion of macro ‘ILOG_ERR’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:1789:17: note: in expansion of macro ‘ILOG_ERR’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:1800:9: note: in expansion of macro ‘ILOG_INFO’
#  825|   	/* sanitize name string by replacing newline with null termination */
#  826|   	raw_tmp = raw;
#  827|-> 	while (*raw_tmp != '\n' && raw_size--)
#  828|   		raw_tmp++;
#  829|   	*raw_tmp = '\0';

Error: CLANG_WARNING: [#def48]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:1026:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1024|   
# 1025|   		/* Convert from timeval to timespec */
# 1026|-> 		rc = gettimeofday(&tp, NULL);
# 1027|   		ts.tv_sec = tp.tv_sec;
# 1028|   		ts.tv_nsec = tp.tv_usec * 1000;

Error: CLANG_WARNING: [#def49]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:1032:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1030|   
# 1031|   		/*  Wait for the nic loop thread to to running */
# 1032|-> 		rc = pthread_cond_timedwait(&nic->nic_loop_started_cond,
# 1033|   					    &nic->nic_mutex, &ts);
# 1034|   

Error: CLANG_WARNING: [#def50]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_utils.c:1073:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1071|   
# 1072|   		/* Convert from timeval to timespec */
# 1073|-> 		rc = gettimeofday(&tp, NULL);
# 1074|   		ts.tv_sec = tp.tv_sec;
# 1075|   		ts.tv_nsec = tp.tv_usec * 1000;

Error: CPPCHECK_WARNING: [#def51]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/nic_vlan.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def52]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/iscsiuio/src/unix/ping.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-590): [#def53]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c:114:17: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘rec’ which points to memory on the stack
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:25:26: note: in definition of macro ‘LIST_HEAD’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:25:26: note: in definition of macro ‘LIST_HEAD’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c:43:52: note: in definition of macro ‘CHECK’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c:43:52: note: in definition of macro ‘CHECK’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c:135:9: note: in expansion of macro ‘CHECK’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c:112:9: note: in expansion of macro ‘list_for_each_entry_safe’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c: scope_hint: In function ‘free_rec_list’
#  112|   	list_for_each_entry_safe(rec, tmp, rec_list, list) {
#  113|   		list_del(&rec->list);
#  114|-> 		free(rec);
#  115|   	}
#  116|   }

Error: COMPILER_WARNING (CWE-1023): [#def54]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c: scope_hint: In function ‘libiscsi_discover_sendtargets’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c:144:9: warning[-Wswitch]: enumeration value ‘libiscsi_auth_none’ not handled in switch
#  144 |         switch(auth_info ? auth_info->method : libiscsi_auth_none) {
#      |         ^~~~~~
#  142|   	strlcpy(drec.address, address, sizeof(drec.address));
#  143|   	drec.port = port ? port : ISCSI_LISTEN_PORT;
#  144|-> 	switch(auth_info ? auth_info->method : libiscsi_auth_none) {
#  145|   	case libiscsi_auth_chap:
#  146|   		drec.u.sendtargets.auth.authmethod = AUTH_METHOD_CHAP;

Error: COMPILER_WARNING: [#def55]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c: scope_hint: In function ‘libiscsi_node_get_auth’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c:392:58: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 225
#  392 |                          "unknown authentication method: %s", value);
#      |                                                          ^~   ~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 32 and 287 bytes into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  390|   	} else {
#  391|   		snprintf(context->error_str, sizeof(context->error_str),
#  392|-> 			 "unknown authentication method: %s", value);
#  393|   		rc = EINVAL;
#  394|   	}

Error: COMPILER_WARNING: [#def56]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c: scope_hint: In function ‘copy_session_info_to_libiscsi_session_info’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c:532:9: warning[-Wstringop-truncation]: ‘strncpy’ output may be truncated copying 1025 bytes from a string of length 1025
#  532 |         strncpy(info->address, s_info->address, NI_MAXHOST);
#      |         ^
#  530|   	/* Target information */
#  531|   	strncpy(info->targetname, s_info->targetname, LIBISCSI_VALUE_MAXLEN);
#  532|-> 	strncpy(info->address, s_info->address, NI_MAXHOST);
#  533|   	strncpy(info->persistent_address, s_info->persistent_address, NI_MAXHOST);
#  534|   	info->tpgt = s_info->tpgt;

Error: COMPILER_WARNING: [#def57]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c:533:9: warning[-Wstringop-truncation]: ‘strncpy’ output may be truncated copying 1025 bytes from a string of length 1025
#  533 |         strncpy(info->persistent_address, s_info->persistent_address, NI_MAXHOST);
#      |         ^
#  531|   	strncpy(info->targetname, s_info->targetname, LIBISCSI_VALUE_MAXLEN);
#  532|   	strncpy(info->address, s_info->address, NI_MAXHOST);
#  533|-> 	strncpy(info->persistent_address, s_info->persistent_address, NI_MAXHOST);
#  534|   	info->tpgt = s_info->tpgt;
#  535|   	info->persistent_port = s_info->persistent_port;

Error: COMPILER_WARNING (CWE-704): [#def58]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c: scope_hint: In function ‘libiscsi_node_set_parameter’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c:609:39: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘idbm_alloc_user_param’ discards ‘const’ qualifier from pointer target type
#  609 |         param = idbm_alloc_user_param(parameter, value);
#      |                                       ^~~~~~~~~
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c:29: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/idbm.h:155:48: note: expected ‘char *’ but argument is of type ‘const char *’
#  155 | struct user_param *idbm_alloc_user_param(char *name, char *value);
#      |                                          ~~~~~~^~~~
#  607|   
#  608|   	INIT_LIST_HEAD(&params);
#  609|-> 	param = idbm_alloc_user_param(parameter, value);
#  610|   	if (!param) {
#  611|   		rc = ENOMEM;

Error: COMPILER_WARNING (CWE-704): [#def59]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/libiscsi.c:609:50: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘idbm_alloc_user_param’ discards ‘const’ qualifier from pointer target type
#  609 |         param = idbm_alloc_user_param(parameter, value);
#      |                                                  ^~~~~
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/idbm.h:155:60: note: expected ‘char *’ but argument is of type ‘const char *’
#  155 | struct user_param *idbm_alloc_user_param(char *name, char *value);
#      |                                                      ~~~~~~^~~~~
#  607|   
#  608|   	INIT_LIST_HEAD(&params);
#  609|-> 	param = idbm_alloc_user_param(parameter, value);
#  610|   	if (!param) {
#  611|   		rc = ENOMEM;

Error: COMPILER_WARNING: [#def60]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/pylibiscsi.c: scope_hint: In function ‘PyIscsiChapAuthInfo_str’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/pylibiscsi.c:186:58: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 254 and 509
#  186 |                 snprintf(reverse, sizeof(reverse), ", %s:%s",
#      |                                                          ^~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 4 and 514 bytes into a destination of size 512
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  184|   
#  185|   	if (chap->info.chap.reverse_username[0])
#  186|-> 		snprintf(reverse, sizeof(reverse), ", %s:%s",
#  187|   			 chap->info.chap.reverse_username,
#  188|   			 chap->info.chap.reverse_password);

Error: COMPILER_WARNING: [#def61]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/pylibiscsi.c: scope_hint: In function ‘PyIscsiNode_str’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libiscsi/pylibiscsi.c:358:35: warning[-Wformat-truncation=]: ‘:’ directive output may be truncated writing 1 byte into a region of size between 0 and 1024
#  358 |         snprintf(s, sizeof(s), "%s:%d%s %s", node->node.address,
#      |                                   ^
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 4 or more bytes (assuming 1283) into a destination of size 1024
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  356|   		sprintf(tpgt, ",%d", node->node.tpgt);
#  357|   
#  358|-> 	snprintf(s, sizeof(s), "%s:%d%s %s", node->node.address,
#  359|   		 node->node.port, tpgt, node->node.name);
#  360|   

Error: CPPCHECK_WARNING: [#def62]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/idbm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def63]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c: scope_hint: In function ‘iscsi_ifaces_get’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:814:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ifaces’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:24: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:40: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:354:9: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:371:9: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:410:9: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:302:9: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:307:17: note: in expansion of macro ‘_alloc_null_check’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:142:15: note: in expansion of macro ‘_asprintf’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:142:15: note: in expansion of macro ‘_asprintf’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:145:15: note: in expansion of macro ‘_asprintf’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:145:15: note: in expansion of macro ‘_asprintf’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:149:9: note: in expansion of macro ‘_alloc_null_check’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:151:9: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:163:9: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:171:9: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:190:9: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:200:9: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:534:15: note: in expansion of macro ‘_asprintf’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:534:15: note: in expansion of macro ‘_asprintf’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:537:9: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:216:17: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:781:9: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:783:9: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:58:9: note: in expansion of macro ‘_iscsi_log_cond’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:784:9: note: in expansion of macro ‘_debug’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:58:9: note: in expansion of macro ‘_iscsi_log_cond’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:784:9: note: in expansion of macro ‘_debug’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:789:9: note: in expansion of macro ‘_alloc_null_check’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:789:9: note: in expansion of macro ‘_alloc_null_check’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:33:26: note: in definition of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:792:17: note: in expansion of macro ‘_good’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:802:17: note: in expansion of macro ‘_alloc_null_check’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:64:9: note: in expansion of macro ‘_iscsi_log_cond’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:81:25: note: in expansion of macro ‘_error’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:802:17: note: in expansion of macro ‘_alloc_null_check’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:64:9: note: in expansion of macro ‘_iscsi_log_cond’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/misc.h:81:25: note: in expansion of macro ‘_error’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/iface.c:802:17: note: in expansion of macro ‘_alloc_null_check’
#  812|   	if (rc != LIBISCSI_OK) {
#  813|   		iscsi_ifaces_free(*ifaces, *iface_count);
#  814|-> 		*ifaces = NULL;
#  815|   		*iface_count = 0;
#  816|   	}

Error: CPPCHECK_WARNING: [#def65]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/sysfs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def66]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/libopeniscsiusr/sysfs.c:559:9: warning[core.NullDereference]: Array access results in a null pointer dereference
#  557|   	if (rc != LIBISCSI_OK) {
#  558|   		for (i = 0; i < *iface_count; i++ ) {
#  559|-> 			free((*iface_kern_ids)[i]);
#  560|   		}
#  561|   		free(*iface_kern_ids);

Error: CPPCHECK_WARNING: [#def67]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/actor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def68]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/auth.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def69]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/discovery.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def70]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/discovery.c:1404:3: warning[deadcode.DeadStores]: Value stored to 'login_failures' is never read
# 1402|   	case ISCSI_STATUS_CLS_SUCCESS:
# 1403|   		log_debug(4, "discovery login success to %s", conn->host);
# 1404|-> 		login_failures = 0;
# 1405|   		break;
# 1406|   	case ISCSI_STATUS_CLS_REDIRECT:

Error: CPPCHECK_WARNING: [#def71]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/discoveryd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def72]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/event_poll.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-401): [#def73]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/event_poll.c:106: error[memleak]: Memory leak: cb
#  104|   	log_debug(1, "adding %d for shutdown cb", pid);
#  105|   	list_add_tail(&cb->list, &shutdown_callbacks);
#  106|-> 	return 0;
#  107|   }
#  108|   

Error: CPPCHECK_WARNING: [#def74]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/flashnode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def75]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/fwparam_ibft/fw_entry.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def76]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/fwparam_ibft/fwparam_ppc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def77]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/fwparam_ibft/fwparam_ppc.c:526:4: warning[unix.Malloc]: Attempt to free released memory
#  524|   	for (i = 0; i < dev_count; i++)
#  525|   		if (ofwdevs[i])
#  526|-> 			free(ofwdevs[i]);
#  527|   
#  528|   	return error;

Error: CLANG_WARNING: [#def78]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/fwparam_ibft/fwparam_ppc.c:612:4: warning[unix.Malloc]: Attempt to free released memory
#  610|   	for (i = 0; i < dev_count; i++)
#  611|   		if (ofwdevs[i])
#  612|-> 			free(ofwdevs[i]);
#  613|   
#  614|   	return error;

Error: CPPCHECK_WARNING: [#def79]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/fwparam_ibft/fwparam_sysfs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def80]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/fwparam_ibft/fwparam_sysfs.c:358:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  356|   	if (file_exist(initiator_dir)) {
#  357|   		/* Find the targets and the ethernets */
#  358|-> 		rc = nftw(rootdir, find_sysfs_dirs, 20, 1);
#  359|   
#  360|   		/* Find wihch target and which ethernet have

Error: CPPCHECK_WARNING: [#def81]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/fwparam_ibft/prom_lex.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def82]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/host.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def83]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/idbm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def84]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/idbm.c:1166:3: warning[unix.Malloc]: Attempt to free released memory
# 1164|   	strlcpy((char*)info[i].value, value, VALUE_MAXVAL);
# 1165|   	if (found)
# 1166|-> 		free(found);
# 1167|   
# 1168|   #define check_password_param(_param) \

Error: CLANG_WARNING: [#def85]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/idbm.c:1777:2: warning[deadcode.DeadStores]: Value stored to 'tmp' is never read
# 1775|   		return 0;
# 1776|   
# 1777|-> 	tmp = 0;
# 1778|   	printf("SENDTARGETS:\n");
# 1779|   	tmp = idbm_print_all_st(info_level);

Error: CLANG_WARNING: [#def86]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/idbm.c:1783:2: warning[deadcode.DeadStores]: Value stored to 'tmp' is never read
# 1781|   		printf("No targets found.\n");
# 1782|   	found += tmp;
# 1783|-> 	tmp = 0;
# 1784|   
# 1785|   	printf("iSNS:\n");

Error: CLANG_WARNING: [#def87]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/idbm.c:1798:2: warning[deadcode.DeadStores]: Value stored to 'tmp' is never read
# 1796|   	}
# 1797|   	found += tmp;
# 1798|-> 	tmp = 0;
# 1799|   
# 1800|   	printf("STATIC:\n");

Error: CLANG_WARNING: [#def88]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/idbm.c:1806:2: warning[deadcode.DeadStores]: Value stored to 'tmp' is never read
# 1804|   		printf("No targets found.\n");
# 1805|   	found += tmp;
# 1806|-> 	tmp = 0;
# 1807|   
# 1808|   	printf("FIRMWARE:\n");

Error: CLANG_WARNING: [#def89]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/idbm.c:2262:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2260|   		log_warning("using tpgt %u from existing record", tpgt);
# 2261|   		rec->tpgt = tpgt;
# 2262|-> 		rc = idbm_remove_disc_to_node_link(rec, portal);
# 2263|   		free(portal);
# 2264|   		return idbm_rec_write_new(rec);

Error: CLANG_WARNING: [#def90]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/idbm.c:2682:2: warning[unix.Malloc]: Use of memory after it is freed
# 2680|   
# 2681|   fail:
# 2682|-> 	list_for_each_entry_safe(iface, tmp_iface, &def_ifaces, list) {
# 2683|   		list_del(&iface->list);
# 2684|   		free(iface);

Error: CPPCHECK_WARNING: [#def91]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iface.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-401): [#def92]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iface.c:981: error[memleak]: Memory leak: iface_copy
#  979|   	INIT_LIST_HEAD(&iface_copy->list);
#  980|   	list_add_tail(&iface_copy->list, ifaces);
#  981|-> 	return 0;
#  982|   }
#  983|   

Error: GCC_ANALYZER_WARNING (CWE-465): [#def93]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.c:34: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.c: scope_hint: In function ‘iscsi_login_eh’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.h:85:12: warning[-Wanalyzer-deref-before-check]: check of ‘session’ for NULL after already dereferencing it
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.c:702:25: note: in expansion of macro ‘conn_debug’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.c:1565:17: note: in expansion of macro ‘conn_debug’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.c:1565:17: note: in expansion of macro ‘conn_debug’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.c:1565:17: note: in expansion of macro ‘conn_debug’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.c:1569:25: note: in expansion of macro ‘conn_error’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.c:1569:25: note: in expansion of macro ‘conn_error’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.c:702:25: note: in expansion of macro ‘conn_debug’
#   83|   #define conn_debug(level, conn, fmt, ...)			\
#   84|   do {								\
#   85|-> 	if (conn->session == NULL) { 				\
#   86|   		log_debug(level, fmt, ##__VA_ARGS__);		\
#   87|   		break;						\

Error: CPPCHECK_WARNING: [#def94]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator_common.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def95]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/io.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def96]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsi_net_util.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def97]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsi_net_util.c:77: warning[uninitvar]: Uninitialized variables: drvinfo.n_priv_flags, drvinfo.n_stats, drvinfo.testinfo_len, drvinfo.eedump_len, drvinfo.regdump_len
#   75|   
#   76|   	drvinfo.cmd = ETHTOOL_GDRVINFO;
#   77|-> 	ifr.ifr_data = (caddr_t)&drvinfo;
#   78|   	err = ioctl(fd, SIOCETHTOOL, &ifr);
#   79|   	if (err < 0) {

Error: CPPCHECK_WARNING: [#def98]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsi_sysfs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def99]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsi_sysfs.c:1156:3: warning[core.uninitialized.Assign]: The expression is an uninitialized value. The computed value will also be garbage
# 1154|   		if (rc != 0)
# 1155|   			break;
# 1156|-> 		(*nr_found)++;
# 1157|   	}
# 1158|   

Error: CLANG_WARNING: [#def100]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsi_sysfs.c:1638:3: warning[deadcode.DeadStores]: Value stored to 'sysfs_len' is never read
# 1636|   	sysfs_len = strlcpy(path_full, sysfs_path, sizeof(path_full));
# 1637|   	if (sysfs_len >= sizeof(path_full))
# 1638|-> 		sysfs_len = sizeof(path_full) - 1;
# 1639|   	strlcat(path_full, devpath, sizeof(path_full));
# 1640|   

Error: CLANG_WARNING: [#def101]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsi_sysfs.c:1726:3: warning[deadcode.DeadStores]: Value stored to 'sysfs_len' is never read
# 1724|   	sysfs_len = strlcpy(path_full, sysfs_path, sizeof(path_full));
# 1725|   	if (sysfs_len >= sizeof(path_full))
# 1726|-> 		sysfs_len = sizeof(path_full) - 1;
# 1727|   	strlcat(path_full, devpath, sizeof(path_full));
# 1728|   	strlcat(path_full, "/device", sizeof(devpath));

Error: CPPCHECK_WARNING: [#def102]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsi_util.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def103]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-401): [#def104]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:379: error[memleak]: Memory leak: rec_copy
#  377|   	INIT_LIST_HEAD(&rec_copy->list);
#  378|   	list_add_tail(&rec_copy->list, list);
#  379|-> 	return 0;
#  380|   }
#  381|   

Error: CLANG_WARNING: [#def105]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:1071:6: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 1069|   
# 1070|   	/* brand new target */
# 1071|-> 	if (strlen(rec->name) && strlen(rec->conn[0].address)) {
# 1072|   		rc = add_static_rec(&nr_found, rec->name, rec->tpgt,
# 1073|   				    rec->conn[0].address, rec->conn[0].port,

Error: CLANG_WARNING: [#def106]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:1428:9: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'struct iovec', which is incompatible with sizeof operand type 'char'
# 1426|   	/* +2 for event and nlmsghdr */
# 1427|   	param_count += 2;
# 1428|-> 	iovs = calloc((param_count * sizeof(struct iovec)),
# 1429|   		       sizeof(char));
# 1430|   	if (!iovs) {

Error: CLANG_WARNING: [#def107]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:1674:9: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'struct iovec', which is incompatible with sizeof operand type 'char'
# 1672|   	/* +2 for event and nlmsghdr */
# 1673|   	param_count += 2;
# 1674|-> 	iovs = calloc((param_count * sizeof(struct iovec)),
# 1675|   		       sizeof(char));
# 1676|   	if (!iovs) {

Error: CLANG_WARNING: [#def108]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:1864:2: warning[deadcode.DeadStores]: Value stored to 'i' is never read
# 1862|   	idbm_recinfo_flashnode(&fnode, flashnode_info);
# 1863|   
# 1864|-> 	i = 0;
# 1865|   	list_for_each_entry(param, params, list) {
# 1866|   		param_count++;

Error: CLANG_WARNING: [#def109]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:1881:9: warning[unix.MallocSizeof]: Result of 'calloc' is converted to a pointer of type 'struct iovec', which is incompatible with sizeof operand type 'char'
# 1879|   	/* +2 for event and nlmsghdr */
# 1880|   	param_count += 2;
# 1881|-> 	iovs = calloc((param_count * sizeof(struct iovec)),
# 1882|   		       sizeof(char));
# 1883|   	if (!iovs) {

Error: CLANG_WARNING: [#def110]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:2914:6: warning[core.NullDereference]: Dereference of null pointer
# 2912|   		rc = print_nodes_config(ctx, do_show ? true : false,
# 2913|   					rec->name, rec->conn[0].address,
# 2914|-> 					rec->conn[0].port, rec->iface.name);
# 2915|   		goto out;
# 2916|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def111]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:3034: error[ctunullpointer]: Null pointer dereference: params
# 3032|   	rec->session.scan = -1;
# 3033|   
# 3034|-> 	list_for_each_entry(param, params, list) {
# 3035|   		/*
# 3036|   		 * do not allow user to override iface parameters, since

Error: GCC_ANALYZER_WARNING (CWE-590): [#def112]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:4139:17: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘iface’ which points to memory on the stack
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:25:26: note: in definition of macro ‘LIST_HEAD’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:25:26: note: in definition of macro ‘LIST_HEAD’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c:4137:9: note: in expansion of macro ‘list_for_each_entry_safe’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsiadm.c: scope_hint: In function ‘main’
# 4137|   	list_for_each_entry_safe(iface, tmp_iface, &ifaces, list) {
# 4138|   		list_del(&iface->list);
# 4139|-> 		free(iface);
# 4140|   	}
# 4141|   	list_for_each_entry_safe(param, tmp_param, &params, list) {

Error: CPPCHECK_WARNING: [#def113]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsid.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def114]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsid.c:467:2: warning[deadcode.DeadStores]: Value stored to 'control_fd' is never read
#  465|   
#  466|   	mgmt_ipc_fd = -1;
#  467|-> 	control_fd = -1;
#  468|   	daemon_config.initiator_name = NULL;
#  469|   	daemon_config.initiator_alias = NULL;

Error: CPPCHECK_WARNING: [#def115]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsid_req.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def116]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsistart.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-126): [#def117]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsistart.c: scope_hint: In function ‘apply_params’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsistart.c:154:34: warning[-Wanalyzer-out-of-bounds]: buffer over-read
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/config.h:28: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/mgmt_ipc.h:24: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/initiator.h:31: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsistart.c:36: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/include/list.h:25:26: note: in definition of macro ‘LIST_HEAD’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsistart.c: scope_hint: In function ‘apply_params’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsistart.c: scope_hint: In function ‘apply_params’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsistart.c:148:9: note: in expansion of macro ‘list_for_each_entry’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/iscsistart.c:154:34: note: read of 8 bytes from after the end of ‘user_params’
#                                              └──────────────────────────┘
#                                                           ^
#  152|   		 * with user overrides
#  153|   		 */
#  154|-> 		if (!strcmp(param->name, IFACE_NETNAME)) {
#  155|   			/* overriding netname so MAC will be for old netdev */
#  156|   			memset(rec->iface.hwaddress, 0,

Error: CPPCHECK_WARNING: [#def118]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/log.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def119]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/login.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def120]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/login.c:1062:3: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
# 1060|   	if ((rc == AUTH_STATUS_NO_ERROR) && present) {
# 1061|   		/* actually fill in the key */
# 1062|-> 		strncpy(&data[pdu_length], key, key_length);
# 1063|   		pdu_length += key_length;
# 1064|   		data[pdu_length] = '=';

Error: CPPCHECK_WARNING: [#def121]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/mgmt_ipc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def122]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/netlink.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def123]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/netlink.c:197:11: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  195|   
#  196|   	for (i = 0; i < count; i++) {
#  197|-> 		datalen += iovp[i].iov_len;
#  198|   	}
#  199|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def124]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/netlink.c: scope_hint: In function ‘kwritev’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/netlink.c:197:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.iov_len’
#  195|   
#  196|   	for (i = 0; i < count; i++) {
#  197|-> 		datalen += iovp[i].iov_len;
#  198|   	}
#  199|   

Error: CLANG_WARNING: [#def125]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/netlink.c:297:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  295|   	log_debug(7, "in %s", __FUNCTION__);
#  296|   
#  297|-> 	rc = kwritev(type, iovp, count);
#  298|   
#  299|   	do {

Error: CLANG_WARNING: [#def126]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/netlink.c:1162:5: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1160|   			if (pfd.revents & (POLLIN | POLLPRI)) {
# 1161|   				timeout = iscsi_timer_msecs_until(&ping_timer);
# 1162|-> 				rc = ipc->ctldev_handle();
# 1163|   
# 1164|   				if (ping_event.active != 1)

Error: CPPCHECK_WARNING: [#def127]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/scsi.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def128]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_info.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-401): [#def129]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_info.c:41: error[memleak]: Memory leak: new
#   39|   	if (list_empty(list)) {
#   40|   		list_add_tail(&new->list, list);
#   41|-> 		return 0;
#   42|   	}
#   43|   

Error: CLANG_WARNING: [#def130]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_info.c:305:8: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  303|   		       (strcmp(prev_address, curr_address) == 0) &&
#  304|   		       (curr_port == prev_port))) {
#  305|-> 			if (strchr(curr_address, '.'))
#  306|   				printf("%s\tCurrent Portal: %s:%" PRIi32
#  307|   				       ",%" PRIi32 "\n",

Error: CPPCHECK_WARNING: [#def131]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-126): [#def132]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c:69:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c:68:9: note: in expansion of macro ‘list_for_each_entry_safe’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c:69:17: note: read of 4 bytes from after the end of ‘list’
#                                                 └───────────────────────┘
#                                                             ^
#   67|   
#   68|   	list_for_each_entry_safe(curr, tmp, list, list) {
#   69|-> 		close(curr->fd);
#   70|   		list_del(&curr->list);
#   71|   		free(curr);

Error: GCC_ANALYZER_WARNING (CWE-590): [#def133]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c:71:17: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘curr’ which points to memory on the stack
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c:68:9: note: in expansion of macro ‘list_for_each_entry_safe’
#   69|   		close(curr->fd);
#   70|   		list_del(&curr->list);
#   71|-> 		free(curr);
#   72|   	}
#   73|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c: scope_hint: In function ‘__iscsi_login_portal’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/session_mgmt.c:137:24: warning[-Wanalyzer-malloc-leak]: leak of ‘async_req’
#  135|   		if (async_req)
#  136|   			free(async_req);
#  137|-> 		return rc;
#  138|   	}
#  139|   

Error: CPPCHECK_WARNING: [#def135]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/sysfs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def136]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/sysfs.c:352:3: warning[deadcode.DeadStores]: Value stored to 'sysfs_len' is never read
#  350|   	sysfs_len = strlcpy(path_full, sysfs_path, sizeof(path_full));
#  351|   	if(sysfs_len >= sizeof(path_full))
#  352|-> 		sysfs_len = sizeof(path_full) - 1;
#  353|   	strlcat(path_full, devpath, sizeof(path_full));
#  354|   	strlcat(path_full, "/", sizeof(path_full));

Error: CLANG_WARNING: [#def137]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/sysfs.c:660:3: warning[deadcode.DeadStores]: Value stored to 'sysfs_len' is never read
#  658|   	sysfs_len = strlcpy(path_full, sysfs_path, sizeof(path_full));
#  659|   	if(sysfs_len >= sizeof(path_full))
#  660|-> 		sysfs_len = sizeof(path_full) - 1;
#  661|   	strlcat(path_full, devpath, sizeof(path_full));
#  662|   	strlcat(path_full, "/", sizeof(path_full));

Error: GCC_ANALYZER_WARNING (CWE-688): [#def138]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/sysfs.c: scope_hint: In function ‘sysfs_get_uevent_field’
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/sysfs.c:707:21: warning[-Wanalyzer-null-argument]: use of NULL ‘ff’ where non-null expected
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/sysfs.h:27: included_from: Included from here.
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/usr/sysfs.c:35: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
#  705|   		ff = strtok(line, "=");
#  706|   		d = strtok(NULL, "\n");
#  707|-> 		if (strcmp(ff, field))
#  708|   			continue;
#  709|   		out = strdup(d);

Error: CPPCHECK_WARNING: [#def139]
iscsi-initiator-utils-6.2.1.9-build/open-iscsi-a65a472a35b436c7a2d47c5862aae530ac4ae9c8/utils/iscsi-iname.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-106.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameiscsi-initiator-utils-6.2.1.9-21.gita65a472.fc41
store-results-to/tmp/tmpkqzzji9e/iscsi-initiator-utils-6.2.1.9-21.gita65a472.fc41.tar.xz
time-created2024-07-03 13:21:56
time-finished2024-07-03 13:24:55
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpkqzzji9e/iscsi-initiator-utils-6.2.1.9-21.gita65a472.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpkqzzji9e/iscsi-initiator-utils-6.2.1.9-21.gita65a472.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9