summaryrefslogtreecommitdiff
path: root/lib/filter.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/filter.c')
-rw-r--r--lib/filter.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/filter.c b/lib/filter.c
index cd17a562f0..46e0bbe804 100644
--- a/lib/filter.c
+++ b/lib/filter.c
@@ -1259,6 +1259,14 @@ filter_set_zebra (struct vty *vty, const char *name_str, const char *type_str,
struct access_list *access;
struct prefix p;
+ if (strlen(name_str) > ACL_NAMSIZ)
+ {
+ vty_out (vty, "%% ACL name %s is invalid: length exceeds "
+ "%d characters%s",
+ name_str, ACL_NAMSIZ, VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
/* Check of filter type. */
if (strncmp (type_str, "p", 1) == 0)
type = FILTER_PERMIT;