From: Quentin Young Date: Fri, 3 Feb 2017 18:23:50 +0000 (+0000) Subject: bgpd: fix array oob for `show ip bgp` X-Git-Tag: frr-3.0-branchpoint~50^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F166%2Fhead;p=mirror%2Ffrr.git bgpd: fix array oob for `show ip bgp` Signed-off-by: Quentin Young --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 403bdb653c..0123ed17ea 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8106,7 +8106,10 @@ DEFUN (show_ip_bgp, bgp = bgp_lookup_by_vrf_id (vrf); if (bgp == NULL) { - vty_out (vty, "Can't find BGP instance %s%s", argv[5]->arg, VTY_NEWLINE); + if (vrf == VRF_DEFAULT) + vty_out (vty, "Can't find BGP instance (default)%s", VTY_NEWLINE); + else + vty_out (vty, "Can't find BGP instance %d%s", vrf, VTY_NEWLINE); return CMD_WARNING; }