New Defects reported by Coverity Scan for freerangerouting/frr
scan-admin at coverity.com
scan-admin at coverity.com
Fri Jun 4 18:00:12 UTC 2021
Hi,
Please find the latest report on new defect(s) introduced to freerangerouting/frr found with Coverity Scan.
2 new defect(s) introduced to freerangerouting/frr found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 1505132: Error handling issues (CHECKED_RETURN)
/pathd/path_pcep_debug.c: 983 in format_yang_dnode()
________________________________________________________________________________________________________
*** CID 1505132: Error handling issues (CHECKED_RETURN)
/pathd/path_pcep_debug.c: 983 in format_yang_dnode()
977
978 const char *format_yang_dnode(struct lyd_node *dnode)
979 {
980 char *buff;
981 int len;
982
>>> CID 1505132: Error handling issues (CHECKED_RETURN)
>>> Calling "lyd_print_mem" without checking return value (as is done elsewhere 4 out of 5 times).
983 lyd_print_mem(&buff, dnode, LYD_JSON, LYD_PRINT_WD_ALL);
984 len = strlen(buff);
985 memcpy(_debug_buff, buff, len);
986 free(buff);
987 return _debug_buff;
988 }
** CID 1505131: Null pointer dereferences (REVERSE_INULL)
/bgpd/bgp_mplsvpn.c: 586 in ensure_vrf_tovpn_sid()
________________________________________________________________________________________________________
*** CID 1505131: Null pointer dereferences (REVERSE_INULL)
/bgpd/bgp_mplsvpn.c: 586 in ensure_vrf_tovpn_sid()
580 return;
581
582 /*
583 * skip when bgp vpn instance ins't allocated
584 * or srv6 locator chunk isn't allocated
585 */
>>> CID 1505131: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "bgp_vrf" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
586 if (!bgp_vpn || !bgp_vpn->srv6_locator_chunks || !bgp_vrf)
587 return;
588
589 tovpn_sid_index = bgp_vrf->vpn_policy[afi].tovpn_sid_index;
590 tovpn_sid_auto = CHECK_FLAG(bgp_vrf->vpn_policy[afi].flags,
591 BGP_VPN_POLICY_TOVPN_SID_AUTO);
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yrtN2DGUU98GYhjd55wXsXtw53zRK70R0agdV-2Fb7c45-2BkxBoZjryQtr5SpUD80NNfE-3DnnbR_O0IDF7c8sUs2B6kWTeWwAJZqriD5fgsfL8PAN30oQTyjQQZIdxWLWeu4-2FMuAMuyroJBpLfKEddUkw4Cq9TRqforqxREIC-2BKNHTEpt-2BEfqLLGquCKF-2BreuoXEMXnnGRQB6a-2BDfJFbJoDvnzvu-2FVkKolybMN0Z5wlY7mW8-2Fm02Uo7BNeDMSF64SFVjeGPSx5mgI5DtT4N9KK57v9TCLVQZtw-3D-3D
More information about the dev
mailing list