aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjiangxiaoming <jiangxiaoming@outlook.com>2020-10-22 10:08:36 +0800
committerDamjan Marion <dmarion@me.com>2020-10-23 19:40:15 +0000
commit94a92aaa4e3762e671b3a982e5ffc2795c09caa9 (patch)
tree61c854ca4ebebdc032740f8258f5a57ad94bb611 /src
parent55e556c93df001617863494e873498d9c0b7c172 (diff)
vlib: log: fix non-null terminated strings
Type: fix Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com> Change-Id: Id61966048875ca56a416caa520125c8c2366bf7b
Diffstat (limited to 'src')
-rw-r--r--src/vlib/log.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vlib/log.c b/src/vlib/log.c
index 27d2e16b006..1bf19b0c2ea 100644
--- a/src/vlib/log.c
+++ b/src/vlib/log.c
@@ -187,6 +187,7 @@ vlib_log (vlib_log_level_t level, vlib_log_class_t class, char *fmt, ...)
indent = vec_len (l);
}
fmt = format (0, "%%-%uU [%%-6U]: ", lm->max_class_name_length);
+ vec_terminate_c_string (fmt);
l = format (l, (char *) fmt, format_vlib_log_class, class,
format_vlib_log_level, level);
vec_free (fmt);