New Defects reported by Coverity Scan for freerangerouting/frr
Hi, Please find the latest report on new defect(s) introduced to freerangerouting/frr found with Coverity Scan. 4 new defect(s) introduced to freerangerouting/frr found with Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 4 of 4 defect(s) ** CID 1504731: Control flow issues (DEADCODE) /pathd/path_cli.c: 425 in segment_list_has_prefix() ________________________________________________________________________________________________________ *** CID 1504731: Control flow issues (DEADCODE) /pathd/path_cli.c: 425 in segment_list_has_prefix() 419 } 420 inet_ntop(AF_INET6, &prefix_cli.u.prefix6, buf_prefix, 421 sizeof(buf_prefix)); 422 pre_ipaddr.ipa_type = IPADDR_V6; 423 pre_ipaddr.ip._v6_addr = prefix_cli.u.prefix6; 424 } else {
CID 1504731: Control flow issues (DEADCODE) Execution cannot reach this statement: "return 2;".
425 return CMD_ERR_NO_MATCH; 426 } 427 snprintf(xpath, XPATH_MAXLEN, "./segment[index='%s']/nai/local-address", 428 index_str); 429 nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY, buf_prefix); 430 snprintf(xpath, XPATH_MAXLEN,
** CID 1504730: Control flow issues (DEADCODE) /pathd/path_cli.c: 532 in srte_segment_list_segment_magic() ________________________________________________________________________________________________________ *** CID 1504730: Control flow issues (DEADCODE) /pathd/path_cli.c: 532 in srte_segment_list_segment_magic() 526 } else { 527 segment_list_has_prefix( 528 vty, xpath, index, index_str, prefix_ipv4, 529 prefix_ipv4_str, prefix_ipv6, prefix_ipv6_str, has_algo, 530 algo, algo_str, has_iface_id, iface_id, iface_id_str); 531 if (status != CMD_SUCCESS)
CID 1504730: Control flow issues (DEADCODE) Execution cannot reach this statement: "return status;".
532 return status; 533 } 534 535 return nb_cli_apply_changes(vty, NULL); 536 } 537
** CID 1504729: Control flow issues (DEADCODE) /pathd/path_cli.c: 355 in segment_list_has_src_dst() ________________________________________________________________________________________________________ *** CID 1504729: Control flow issues (DEADCODE) /pathd/path_cli.c: 355 in segment_list_has_src_dst() 349 node_src_id = adj_src_ipv4_str; 350 } else if (adj_src_ipv6_str != NULL) { 351 nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY, 352 "ipv6_adjacency"); 353 node_src_id = adj_src_ipv6_str; 354 } else {
CID 1504729: Control flow issues (DEADCODE) Execution cannot reach this statement: "return 2;".
355 return CMD_ERR_NO_MATCH; 356 } 357 /* addresses */ 358 snprintf(xpath, XPATH_MAXLEN, "./segment[index='%s']/nai/local-address", 359 index_str); 360 nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY, node_src_id);
** CID 1504728: Null pointer dereferences (REVERSE_INULL) /pathd/pathd.c: 203 in srte_segment_entry_set_nai() ________________________________________________________________________________________________________ *** CID 1504728: Null pointer dereferences (REVERSE_INULL) /pathd/pathd.c: 203 in srte_segment_entry_set_nai() 197 { 198 int32_t status = 0; 199 struct prefix pre = {0}; 200 segment->nai_type = type; 201 memcpy(&segment->nai_local_addr, local_ip, sizeof(struct ipaddr)); 202
CID 1504728: Null pointer dereferences (REVERSE_INULL) Null-checking "segment" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
203 if (!segment || !local_ip || !remote_ip) 204 return 1; 205 206 switch (type) { 207 case SRTE_SEGMENT_NAI_TYPE_IPV4_NODE: 208 case SRTE_SEGMENT_NAI_TYPE_IPV6_NODE:
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0...
participants (1)
-
scan-admin@coverity.com