From 853d2e14e6bb9177b5198f9fec1d2fb085a36c89 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 17 Apr 2019 16:53:28 +0200 Subject: [PATCH] null term? --- client/jansson/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/jansson/error.c b/client/jansson/error.c index fd2557367..06dc837ec 100644 --- a/client/jansson/error.c +++ b/client/jansson/error.c @@ -22,7 +22,7 @@ void jsonp_error_set_source(json_error_t *error, const char *source) { length = strlen(source); if (length < JSON_ERROR_SOURCE_LENGTH) { - strncpy(error->source, source, JSON_ERROR_SOURCE_LENGTH); + strncpy(error->source, source, JSON_ERROR_SOURCE_LENGTH - 1); } else { size_t extra = length - JSON_ERROR_SOURCE_LENGTH + 4; memcpy(error->source, "...", 3);