summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nDPId.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nDPId.c b/nDPId.c
index e3a886132..be69b55e8 100644
--- a/nDPId.c
+++ b/nDPId.c
@@ -680,7 +680,8 @@ static void send_to_json_sink(struct nDPId_reader_thread * const reader_thread,
int s_ret;
char newline_json_str[BUFSIZ];
- s_ret = snprintf(newline_json_str, sizeof(newline_json_str), "%.*s\n", (int)json_str_len, json_str);
+ s_ret = snprintf(newline_json_str, sizeof(newline_json_str), "%zu%.*s\n",
+ json_str_len, (int)json_str_len, json_str);
if (s_ret < 0 || s_ret > (int)sizeof(newline_json_str))
{
syslog(LOG_DAEMON | LOG_ERR,