summaryrefslogtreecommitdiffstats
path: root/src/vlib/cli.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-12-16 15:49:47 +0100
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-12 07:43:14 +0000
commita699926a0dde50586510cd697b4cafc6cc51ab9e (patch)
tree9aaf25e1a8a97beffd0b657bedeeb0e7664faadb /src/vlib/cli.c
parentd8e41e7810d453396c49321d28d0d73b3b50c09b (diff)
vlib: fix vector-as-C-string overflow
Type: fix Change-Id: If0419ff1a82d45e5b3326973008e1b9feb290c5a Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 62d9fda8e474f87459c6e24d13b09f7bfec146f3)
Diffstat (limited to 'src/vlib/cli.c')
-rw-r--r--src/vlib/cli.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlib/cli.c b/src/vlib/cli.c
index ec27c481374..c1cab16fe01 100644
--- a/src/vlib/cli.c
+++ b/src/vlib/cli.c
@@ -639,7 +639,7 @@ vlib_cli_dispatch_sub_commands (vlib_main_t * vm,
u32 c;
} *ed;
ed = ELOG_DATA (&vm->elog_main, e);
- ed->c = elog_string (&vm->elog_main, c->path);
+ ed->c = elog_string (&vm->elog_main, "%v", c->path);
}
if (!c->is_mp_safe)
@@ -665,7 +665,7 @@ vlib_cli_dispatch_sub_commands (vlib_main_t * vm,
u32 c, err;
} *ed;
ed = ELOG_DATA (&vm->elog_main, e);
- ed->c = elog_string (&vm->elog_main, c->path);
+ ed->c = elog_string (&vm->elog_main, "%v", c->path);
if (c_error)
{
vec_add1 (c_error->what, 0);