From bbe6d110a10d64e5bde21c4b839642acfbf91cbd Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Wed, 10 Jul 2019 17:01:09 +0200 Subject: syslog: fix syslog structured data formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit syslog structured data are stored as vectors not null-terminated C-strings. Use '%v' instead of '%s'. Type: fix Fixes: b4515b4be4 Change-Id: Iba224f271c832daca90d4bbccfef45d0f563fe60 Signed-off-by: Benoît Ganne --- src/vnet/syslog/syslog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vnet/syslog') diff --git a/src/vnet/syslog/syslog.c b/src/vnet/syslog/syslog.c index 462c5deeecd..f104691a614 100644 --- a/src/vnet/syslog/syslog.c +++ b/src/vnet/syslog/syslog.c @@ -72,7 +72,7 @@ format_syslog_structured_data (u8 * s, va_list * args) if (vec_len (sds)) { for (i = 0; i < vec_len (sds); i++) - s = format (s, "[%s]", sds[i]); + s = format (s, "[%v]", sds[i]); } /* if zero structured data elemts field must contain NILVALUE */ else -- cgit 1.2.3-korg