diff options
author | Benoît Ganne <bganne@cisco.com> | 2019-07-10 17:01:09 +0200 |
---|---|---|
committer | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-07-12 01:50:55 +0000 |
commit | bbe6d110a10d64e5bde21c4b839642acfbf91cbd (patch) | |
tree | 123fd08c8cfa441cd09c9bc8e846c4bc2c55a0ff /src | |
parent | 9e4946b324a8480b35c861e96199881b314ea825 (diff) |
syslog: fix syslog structured data formatting
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 <bganne@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/syslog/syslog.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |