diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 2b8d3e56e521..92214eced4ae 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -1457,7 +1457,7 @@ static void clear_interfaces(struct pim_instance *pim) static void pim_cli_legacy_mesh_group_behavior(struct vty *vty, const char *gname) { - char xpath_value[XPATH_MAXLEN]; + char xpath_value[XPATH_MAXLEN + 26]; char xpath_member_value[XPATH_MAXLEN]; const struct lyd_node *member_dnode; @@ -4314,7 +4314,7 @@ DEFPY (no_pim_ssm_prefix_list_name, "Name of a prefix-list\n") { const struct lyd_node *ssm_plist_dnode; - char ssm_plist_xpath[XPATH_MAXLEN]; + char ssm_plist_xpath[XPATH_MAXLEN + 16]; const char *ssm_plist_name; snprintf(ssm_plist_xpath, sizeof(ssm_plist_xpath), "%s/ssm-prefix-list", @@ -4350,7 +4350,7 @@ DEFPY_ATTR(no_ip_pim_ssm_prefix_list_name, CMD_ATTR_HIDDEN | CMD_ATTR_DEPRECATED) { const struct lyd_node *ssm_plist_dnode; - char ssm_plist_xpath[XPATH_MAXLEN]; + char ssm_plist_xpath[XPATH_MAXLEN + 16]; const char *ssm_plist_name; int ret = CMD_WARNING_CONFIG_FAILED; const char *vrfname; @@ -6574,7 +6574,7 @@ DEFPY(no_pim_msdp_mesh_group_member, "Mesh group member\n" "Peer IP address\n") { - char xpath_value[XPATH_MAXLEN]; + char xpath_value[XPATH_MAXLEN + 26]; char xpath_member_value[XPATH_MAXLEN]; /* Get mesh group base XPath. */ @@ -6620,7 +6620,7 @@ DEFPY_ATTR(no_ip_pim_msdp_mesh_group_member, "Peer IP address\n", CMD_ATTR_HIDDEN | CMD_ATTR_DEPRECATED) { - char xpath_value[XPATH_MAXLEN]; + char xpath_value[XPATH_MAXLEN + 26]; char xpath_member_value[XPATH_MAXLEN]; int ret = CMD_WARNING_CONFIG_FAILED; const char *vrfname; @@ -6852,7 +6852,7 @@ DEFPY(no_pim_msdp_mesh_group, "Delete MSDP mesh-group\n" "Mesh group name\n") { - char xpath_value[XPATH_MAXLEN]; + char xpath_value[XPATH_MAXLEN + 26]; /* Get mesh group base XPath. */ snprintf(xpath_value, sizeof(xpath_value), @@ -6873,7 +6873,7 @@ DEFPY_ATTR(no_ip_pim_msdp_mesh_group, "Mesh group name\n", CMD_ATTR_HIDDEN | CMD_ATTR_DEPRECATED) { - char xpath_value[XPATH_MAXLEN]; + char xpath_value[XPATH_MAXLEN + 26]; int ret = CMD_SUCCESS; const char *vrfname; char xpath[XPATH_MAXLEN]; diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c index c6cb28c097b9..6ef5ff7df2d6 100644 --- a/pimd/pim_cmd_common.c +++ b/pimd/pim_cmd_common.c @@ -100,8 +100,8 @@ int pim_process_no_join_prune_cmd(struct vty *vty) int pim_process_spt_switchover_infinity_cmd(struct vty *vty) { - char spt_plist_xpath[XPATH_MAXLEN]; - char spt_action_xpath[XPATH_MAXLEN]; + char spt_plist_xpath[XPATH_MAXLEN + 40]; + char spt_action_xpath[XPATH_MAXLEN + 26]; snprintf(spt_plist_xpath, sizeof(spt_plist_xpath), "%s/spt-switchover/spt-infinity-prefix-list", VTY_CURR_XPATH); @@ -522,7 +522,7 @@ int pim_process_no_rp_cmd(struct vty *vty, const char *rp_str, const char *group_str) { char group_xpath[XPATH_MAXLEN]; - char rp_xpath[XPATH_MAXLEN]; + char rp_xpath[XPATH_MAXLEN + 47]; int printed; const struct lyd_node *group_dnode; @@ -568,8 +568,8 @@ int pim_process_rp_plist_cmd(struct vty *vty, const char *rp_str, int pim_process_no_rp_plist_cmd(struct vty *vty, const char *rp_str, const char *prefix_list) { - char rp_xpath[XPATH_MAXLEN]; - char plist_xpath[XPATH_MAXLEN]; + char rp_xpath[XPATH_MAXLEN + 47]; + char plist_xpath[XPATH_MAXLEN + 1070 ]; const struct lyd_node *plist_dnode; const char *plist;