[dev] New Defects reported by Coverity Scan for freerangerouting/frr

scan-admin at coverity.com scan-admin at coverity.com
Mon Jul 31 14:46:23 EDT 2017


Hi,

Please find the latest report on new defect(s) introduced to freerangerouting/frr found with Coverity Scan.

79 new defect(s) introduced to freerangerouting/frr 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 20 of 79 defect(s)


** CID 1452363:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 88 in no_ldp_address_family()


________________________________________________________________________________________________________
*** CID 1452363:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 88 in no_ldp_address_family()
82     		if (_fail)
83     			vty_out (vty, "%% invalid input for %s: %s\n",
84     				   argv[_i]->varname, argv[_i]->arg);
85     		_failcnt += _fail;
86     	}
87     	if (_failcnt)
>>>     CID 1452363:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "return 1;".
88     		return CMD_WARNING;
89     	return no_ldp_address_family_magic(self, vty, argc, argv, af);
90     }
91     
92     /* ldp_discovery_holdtime => "[no] discovery <hello|targeted-hello>$hello_type holdtime (1-65535)$holdtime" */
93     DEFUN_CMD_FUNC_DECL(ldp_discovery_holdtime)

** CID 1452362:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1045 in no_ldp_member_pseudowire()


________________________________________________________________________________________________________
*** CID 1452362:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1045 in no_ldp_member_pseudowire()
1039     		if (_fail)
1040     			vty_out (vty, "%% invalid input for %s: %s\n",
1041     				   argv[_i]->varname, argv[_i]->arg);
1042     		_failcnt += _fail;
1043     	}
1044     	if (_failcnt)
>>>     CID 1452362:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "return 1;".
1045     		return CMD_WARNING;
1046     	return no_ldp_member_pseudowire_magic(self, vty, argc, argv, ifname);
1047     }
1048     
1049     /* ldp_vc_type => "[no] vc type <ethernet|ethernet-tagged>$vc_type" */
1050     DEFUN_CMD_FUNC_DECL(ldp_vc_type)

** CID 1452361:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 743 in ldp_ttl_security_disable()


________________________________________________________________________________________________________
*** CID 1452361:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 743 in ldp_ttl_security_disable()
737     		if (_fail)
738     			vty_out (vty, "%% invalid input for %s: %s\n",
739     				   argv[_i]->varname, argv[_i]->arg);
740     		_failcnt += _fail;
741     	}
742     	if (_failcnt)
>>>     CID 1452361:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "return 1;".
743     		return CMD_WARNING;
744     	return ldp_ttl_security_disable_magic(self, vty, argc, argv, no);
745     }
746     
747     /* ldp_session_holdtime => "[no] session holdtime (15-65535)$holdtime" */
748     DEFUN_CMD_FUNC_DECL(ldp_session_holdtime)

** CID 1452360:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1758 in ldp_show_l2vpn_atom_vc()


________________________________________________________________________________________________________
*** CID 1452360:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1758 in ldp_show_l2vpn_atom_vc()
1752     		if (_fail)
1753     			vty_out (vty, "%% invalid input for %s: %s\n",
1754     				   argv[_i]->varname, argv[_i]->arg);
1755     		_failcnt += _fail;
1756     	}
1757     	if (_failcnt)
>>>     CID 1452360:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "return 1;".
1758     		return CMD_WARNING;
1759     	return ldp_show_l2vpn_atom_vc_magic(self, vty, argc, argv, json);
1760     }
1761     
1762     /* ldp_show_debugging_mpls_ldp => "show debugging mpls ldp" */
1763     DEFUN_CMD_FUNC_DECL(ldp_show_debugging_mpls_ldp)

** CID 1452359:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 24 in no_ldp_mpls_ldp()


________________________________________________________________________________________________________
*** CID 1452359:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 24 in no_ldp_mpls_ldp()
18     		if (_fail)
19     			vty_out (vty, "%% invalid input for %s: %s\n",
20     				   argv[_i]->varname, argv[_i]->arg);
21     		_failcnt += _fail;
22     	}
23     	if (_failcnt)
>>>     CID 1452359:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "return 1;".
24     		return CMD_WARNING;
25     	return no_ldp_mpls_ldp_magic(self, vty, argc, argv);
26     }
27     
28     /* no_ldp_l2vpn => "no l2vpn WORD$l2vpn_name type vpls" */
29     DEFUN_CMD_FUNC_DECL(no_ldp_l2vpn)

** CID 1452358:  Null pointer dereferences  (FORWARD_NULL)
/ldpd/ldp_vty_cmds_clippy.c: 1101 in ldp_control_word()


________________________________________________________________________________________________________
*** CID 1452358:  Null pointer dereferences  (FORWARD_NULL)
/ldpd/ldp_vty_cmds_clippy.c: 1101 in ldp_control_word()
1095     funcdecl_ldp_control_word;
1096     DEFUN_CMD_FUNC_TEXT(ldp_control_word)
1097     {
1098     	int _i;
1099     	unsigned _fail = 0, _failcnt = 0;
1100     	const char *no = NULL;
>>>     CID 1452358:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "preference" = "NULL".
1101     	const char *preference = NULL;
1102     
1103     	for (_i = 0; _i < argc; _i++) {
1104     		if (!argv[_i]->varname)
1105     			continue;
1106     		_fail = 0;

** CID 1452357:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1753 in ldp_show_l2vpn_atom_vc()


________________________________________________________________________________________________________
*** CID 1452357:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1753 in ldp_show_l2vpn_atom_vc()
1747     			continue;
1748     		_fail = 0;
1749     		if (!strcmp(argv[_i]->varname, "json")) {
1750     			json = argv[_i]->arg;
1751     		}
1752     		if (_fail)
>>>     CID 1452357:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "vty_out(vty, "%% invalid in...".
1753     			vty_out (vty, "%% invalid input for %s: %s\n",
1754     				   argv[_i]->varname, argv[_i]->arg);
1755     		_failcnt += _fail;
1756     	}
1757     	if (_failcnt)
1758     		return CMD_WARNING;

** CID 1452356:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 706 in ldp_label_remote_accept()


________________________________________________________________________________________________________
*** CID 1452356:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 706 in ldp_label_remote_accept()
700     			from_acl = argv[_i]->arg;
701     		}
702     		if (!strcmp(argv[_i]->varname, "for_acl")) {
703     			for_acl = argv[_i]->arg;
704     		}
705     		if (_fail)
>>>     CID 1452356:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "vty_out(vty, "%% invalid in...".
706     			vty_out (vty, "%% invalid input for %s: %s\n",
707     				   argv[_i]->varname, argv[_i]->arg);
708     		_failcnt += _fail;
709     	}
710     	if (_failcnt)
711     		return CMD_WARNING;

** CID 1452355:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 209 in ldp_dual_stack_transport_connection_prefer_ipv4()


________________________________________________________________________________________________________
*** CID 1452355:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 209 in ldp_dual_stack_transport_connection_prefer_ipv4()
203     			continue;
204     		_fail = 0;
205     		if (!strcmp(argv[_i]->varname, "no")) {
206     			no = argv[_i]->arg;
207     		}
208     		if (_fail)
>>>     CID 1452355:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "vty_out(vty, "%% invalid in...".
209     			vty_out (vty, "%% invalid input for %s: %s\n",
210     				   argv[_i]->varname, argv[_i]->arg);
211     		_failcnt += _fail;
212     	}
213     	if (_failcnt)
214     		return CMD_WARNING;

** CID 1452354:  Null pointer dereferences  (FORWARD_NULL)
/ldpd/ldp_vty_cmds_clippy.c: 73 in no_ldp_address_family()


________________________________________________________________________________________________________
*** CID 1452354:  Null pointer dereferences  (FORWARD_NULL)
/ldpd/ldp_vty_cmds_clippy.c: 73 in no_ldp_address_family()
67     	const char * af)
68     funcdecl_no_ldp_address_family;
69     DEFUN_CMD_FUNC_TEXT(no_ldp_address_family)
70     {
71     	int _i;
72     	unsigned _fail = 0, _failcnt = 0;
>>>     CID 1452354:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "af" = "NULL".
73     	const char *af = NULL;
74     
75     	for (_i = 0; _i < argc; _i++) {
76     		if (!argv[_i]->varname)
77     			continue;
78     		_fail = 0;

** CID 1452353:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1694 in ldp_show_mpls_ldp_neighbor_capabilities()


________________________________________________________________________________________________________
*** CID 1452353:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1694 in ldp_show_mpls_ldp_neighbor_capabilities()
1688     		if (_fail)
1689     			vty_out (vty, "%% invalid input for %s: %s\n",
1690     				   argv[_i]->varname, argv[_i]->arg);
1691     		_failcnt += _fail;
1692     	}
1693     	if (_failcnt)
>>>     CID 1452353:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "return 1;".
1694     		return CMD_WARNING;
1695     	return ldp_show_mpls_ldp_neighbor_capabilities_magic(self, vty, argc, argv, json);
1696     }
1697     
1698     /* ldp_show_l2vpn_atom_binding => "show l2vpn atom binding [json]$json" */
1699     DEFUN_CMD_FUNC_DECL(ldp_show_l2vpn_atom_binding)

** CID 1452352:  Null pointer dereferences  (FORWARD_NULL)
/ldpd/ldp_vty_cmds_clippy.c: 1030 in no_ldp_member_pseudowire()


________________________________________________________________________________________________________
*** CID 1452352:  Null pointer dereferences  (FORWARD_NULL)
/ldpd/ldp_vty_cmds_clippy.c: 1030 in no_ldp_member_pseudowire()
1024     	const char * ifname)
1025     funcdecl_no_ldp_member_pseudowire;
1026     DEFUN_CMD_FUNC_TEXT(no_ldp_member_pseudowire)
1027     {
1028     	int _i;
1029     	unsigned _fail = 0, _failcnt = 0;
>>>     CID 1452352:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "ifname" = "NULL".
1030     	const char *ifname = NULL;
1031     
1032     	for (_i = 0; _i < argc; _i++) {
1033     		if (!argv[_i]->varname)
1034     			continue;
1035     		_fail = 0;

** CID 1452351:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1472 in ldp_debug_mpls_ldp_messages_sent()


________________________________________________________________________________________________________
*** CID 1452351:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1472 in ldp_debug_mpls_ldp_messages_sent()
1466     		if (_fail)
1467     			vty_out (vty, "%% invalid input for %s: %s\n",
1468     				   argv[_i]->varname, argv[_i]->arg);
1469     		_failcnt += _fail;
1470     	}
1471     	if (_failcnt)
>>>     CID 1452351:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "return 1;".
1472     		return CMD_WARNING;
1473     	return ldp_debug_mpls_ldp_messages_sent_magic(self, vty, argc, argv, no, all);
1474     }
1475     
1476     /* ldp_show_mpls_ldp_binding => "show mpls ldp [<ipv4|ipv6>]$af binding [detail]$detail [json]$json" */
1477     DEFUN_CMD_FUNC_DECL(ldp_show_mpls_ldp_binding)

** CID 1452350:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1276 in ldp_pw_status_disable()


________________________________________________________________________________________________________
*** CID 1452350:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1276 in ldp_pw_status_disable()
1270     			continue;
1271     		_fail = 0;
1272     		if (!strcmp(argv[_i]->varname, "no")) {
1273     			no = argv[_i]->arg;
1274     		}
1275     		if (_fail)
>>>     CID 1452350:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "vty_out(vty, "%% invalid in...".
1276     			vty_out (vty, "%% invalid input for %s: %s\n",
1277     				   argv[_i]->varname, argv[_i]->arg);
1278     		_failcnt += _fail;
1279     	}
1280     	if (_failcnt)
1281     		return CMD_WARNING;

** CID 1452349:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1040 in no_ldp_member_pseudowire()


________________________________________________________________________________________________________
*** CID 1452349:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1040 in no_ldp_member_pseudowire()
1034     			continue;
1035     		_fail = 0;
1036     		if (!strcmp(argv[_i]->varname, "ifname")) {
1037     			ifname = argv[_i]->arg;
1038     		}
1039     		if (_fail)
>>>     CID 1452349:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "vty_out(vty, "%% invalid in...".
1040     			vty_out (vty, "%% invalid input for %s: %s\n",
1041     				   argv[_i]->varname, argv[_i]->arg);
1042     		_failcnt += _fail;
1043     	}
1044     	if (_failcnt)
1045     		return CMD_WARNING;

** CID 1452348:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1785 in ldp_show_debugging_mpls_ldp()


________________________________________________________________________________________________________
*** CID 1452348:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1785 in ldp_show_debugging_mpls_ldp()
1779     		if (_fail)
1780     			vty_out (vty, "%% invalid input for %s: %s\n",
1781     				   argv[_i]->varname, argv[_i]->arg);
1782     		_failcnt += _fail;
1783     	}
1784     	if (_failcnt)
>>>     CID 1452348:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "return 1;".
1785     		return CMD_WARNING;
1786     	return ldp_show_debugging_mpls_ldp_magic(self, vty, argc, argv);

** CID 1452347:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1361 in ldp_debug_mpls_ldp_discovery_hello()


________________________________________________________________________________________________________
*** CID 1452347:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1361 in ldp_debug_mpls_ldp_discovery_hello()
1355     		if (_fail)
1356     			vty_out (vty, "%% invalid input for %s: %s\n",
1357     				   argv[_i]->varname, argv[_i]->arg);
1358     		_failcnt += _fail;
1359     	}
1360     	if (_failcnt)
>>>     CID 1452347:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "return 1;".
1361     		return CMD_WARNING;
1362     	return ldp_debug_mpls_ldp_discovery_hello_magic(self, vty, argc, argv, no, dir);
1363     }
1364     
1365     /* ldp_debug_mpls_ldp_type => "[no] debug mpls ldp <errors|event|zebra>$type" */
1366     DEFUN_CMD_FUNC_DECL(ldp_debug_mpls_ldp_type)

** CID 1452346:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1620 in ldp_show_mpls_ldp_capabilities()


________________________________________________________________________________________________________
*** CID 1452346:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1620 in ldp_show_mpls_ldp_capabilities()
1614     			continue;
1615     		_fail = 0;
1616     		if (!strcmp(argv[_i]->varname, "json")) {
1617     			json = argv[_i]->arg;
1618     		}
1619     		if (_fail)
>>>     CID 1452346:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "vty_out(vty, "%% invalid in...".
1620     			vty_out (vty, "%% invalid input for %s: %s\n",
1621     				   argv[_i]->varname, argv[_i]->arg);
1622     		_failcnt += _fail;
1623     	}
1624     	if (_failcnt)
1625     		return CMD_WARNING;

** CID 1452345:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1726 in ldp_show_l2vpn_atom_binding()


________________________________________________________________________________________________________
*** CID 1452345:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1726 in ldp_show_l2vpn_atom_binding()
1720     		if (_fail)
1721     			vty_out (vty, "%% invalid input for %s: %s\n",
1722     				   argv[_i]->varname, argv[_i]->arg);
1723     		_failcnt += _fail;
1724     	}
1725     	if (_failcnt)
>>>     CID 1452345:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "return 1;".
1726     		return CMD_WARNING;
1727     	return ldp_show_l2vpn_atom_binding_magic(self, vty, argc, argv, json);
1728     }
1729     
1730     /* ldp_show_l2vpn_atom_vc => "show l2vpn atom vc [json]$json" */
1731     DEFUN_CMD_FUNC_DECL(ldp_show_l2vpn_atom_vc)

** CID 1452344:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1780 in ldp_show_debugging_mpls_ldp()


________________________________________________________________________________________________________
*** CID 1452344:  Control flow issues  (DEADCODE)
/ldpd/ldp_vty_cmds_clippy.c: 1780 in ldp_show_debugging_mpls_ldp()
1774     
1775     	for (_i = 0; _i < argc; _i++) {
1776     		if (!argv[_i]->varname)
1777     			continue;
1778     		_fail = 0;
1779     		if (_fail)
>>>     CID 1452344:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "vty_out(vty, "%% invalid in...".
1780     			vty_out (vty, "%% invalid input for %s: %s\n",
1781     				   argv[_i]->varname, argv[_i]->arg);
1782     		_failcnt += _fail;
1783     	}
1784     	if (_failcnt)
1785     		return CMD_WARNING;
1786     	return ldp_show_debugging_mpls_ldp_magic(self, vty, argc, argv);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRa7dJ8klHLUFWVd2fqpS-2B-2FHaN43B-2FQ11ntcKmbKat2WeHs8691VOJpZofPkpp-2BRBqc-3D_d-2Fi2nRutHp-2FDWtw8JRg-2Bc1m9CS4-2B5uVbodfDyLsp-2FJnbb7MoydVyTd2drE3DiFnl6iIgE83BPsmXhhgNMdzVW-2F8ORaJhNiaRuVvvzacw0WYDWwsEu4WY4RVBCZ7MZI7982IIz4AHe84KsRFllZcexx8mm2L0r7B6iYgeXuLCGg6eW8LH9k9IR6C0wKOQ6v4A87I3FlhM8zfuN8KRq2QLqg-3D-3D

To manage Coverity Scan email notifications for "frr at lists.nox.tf", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4lcTWm1Zma8LQDNpOYqrETKrqBiM18kcBcL8b08LzBPOYJYGySZ4Vv7d5QYcnSbGxl3QyORKgEmDxh-2BE2mj6dp1V4JSs2jbMZuLnEQJOW0Z0-3D_d-2Fi2nRutHp-2FDWtw8JRg-2Bc1m9CS4-2B5uVbodfDyLsp-2FJnbb7MoydVyTd2drE3DiFnlqyt2MbHzvB6oq8jgPz7KQbZAKkZSev3BxQ1xj92NNER-2FbS1da1JQ-2BF-2B1CWBTSk9VaOxO47xCkp6aepQ4Xkfj8zVs11IMB03bYj9XfITOiFfIm-2FMwYr3o6IV7tEvWuz2KREtURhPb9qn4nmv5cnWXwg-3D-3D




More information about the dev mailing list