diff options
Diffstat (limited to 'ldpd/ldp_vty_exec.c')
| -rw-r--r-- | ldpd/ldp_vty_exec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ldpd/ldp_vty_exec.c b/ldpd/ldp_vty_exec.c index 66c127abdc..d317da7b20 100644 --- a/ldpd/ldp_vty_exec.c +++ b/ldpd/ldp_vty_exec.c @@ -193,7 +193,8 @@ show_interface_msg_json(struct imsg *imsg, struct show_params *params, json_object_int_add(json_iface, "adjacencyCount", iface->adj_cnt); - sprintf(key_name, "%s: %s", iface->name, af_name(iface->af)); + snprintf(key_name, sizeof(key_name), "%s: %s", iface->name, + af_name(iface->af)); json_object_object_add(json, key_name, json_iface); break; case IMSG_CTL_END: @@ -1328,7 +1329,8 @@ show_l2vpn_binding_msg_json(struct imsg *imsg, struct show_params *params, json_object_string_add(json_pw, "remoteLabel", "unassigned"); - sprintf(key_name, "%s: %u", inet_ntoa(pw->lsr_id), pw->pwid); + snprintf(key_name, sizeof(key_name), "%s: %u", + inet_ntoa(pw->lsr_id), pw->pwid); json_object_object_add(json, key_name, json_pw); break; case IMSG_CTL_END: |
