mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 07:23:41 +00:00
pimd: A buffer may be used uninited
If we screw up and don't have the right flags we'll print out garbage. At the very least just print out nothing. Signed-off-by: Donald Sharp <sharp@nvidia.com>
This commit is contained in:
parent
b83bb9aa62
commit
f8ca1bb935
@ -6109,6 +6109,7 @@ static void show_mroute(struct pim_instance *pim, struct vty *vty,
|
|||||||
json_object_object_add(json_oil, out_ifname,
|
json_object_object_add(json_oil, out_ifname,
|
||||||
json_ifp_out);
|
json_ifp_out);
|
||||||
} else {
|
} else {
|
||||||
|
proto[0] = '\0';
|
||||||
if (c_oil->oif_flags[oif_vif_index]
|
if (c_oil->oif_flags[oif_vif_index]
|
||||||
& PIM_OIF_FLAG_PROTO_PIM) {
|
& PIM_OIF_FLAG_PROTO_PIM) {
|
||||||
strlcpy(proto, "PIM", sizeof(proto));
|
strlcpy(proto, "PIM", sizeof(proto));
|
||||||
|
Loading…
Reference in New Issue
Block a user