aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2020-11-26 19:56:44 +0100
committerDave Barach <openvpp@barachs.net>2020-11-26 22:45:40 +0000
commit633122e1fd06a3f09e3cd08732fc49b5d0028221 (patch)
tree89ee5a438cb1387c83b53396327e89c117679191 /src
parent98e682dd914363e0c53bd88e7f6c68287761e633 (diff)
vlib: fix vlib log elog vector overrun
vlib log strings are vectors not necessarily null-terminated C-string. Type: fix Fixes: bc867c3d2137dab4b1395196c1936233517980ab Change-Id: Ia805ecdf4e76ccb1001dc93647161ee1c3adebc9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vlib/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/log.c b/src/vlib/log.c
index bd456aeafe9..ed14d9ecdc6 100644
--- a/src/vlib/log.c
+++ b/src/vlib/log.c
@@ -251,7 +251,7 @@ vlib_log (vlib_log_level_t level, vlib_log_class_t class, char *fmt, ...)
/* *INDENT-ON* */
ed = ELOG_DATA (&vm->elog_main, ee);
ed->log_level = level;
- ed->string_index = elog_string (&vm->elog_main, (char *) e->string);
+ ed->string_index = elog_string (&vm->elog_main, "%v", e->string);
}
lm->next = (lm->next + 1) % lm->size;