From 34f488f41ee820371159111bf621f11d0f54f669 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 4 Aug 2019 10:56:44 +0200 Subject: Adding upstream version 1.16.1. Signed-off-by: Daniel Baumann --- libnetdata/json/json.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libnetdata/json') diff --git a/libnetdata/json/json.c b/libnetdata/json/json.c index c9ff39b05..7c5adca3d 100644 --- a/libnetdata/json/json.c +++ b/libnetdata/json/json.c @@ -319,8 +319,8 @@ size_t json_walk_array(char *js, jsmntok_t *t, size_t nest, size_t start, JSON_E info("JSON: JSON walk_array ignoring element with name:%s fullname:%s",e->name, e->fullname); continue; } - sprintf(ne.name, "%s[%lu]", e->name, i); - sprintf(ne.fullname, "%s[%lu]", e->fullname, i); + snprintfz(ne.name, JSON_NAME_LEN, "%s[%lu]", e->name, i); + snprintfz(ne.fullname, JSON_FULLNAME_LEN, "%s[%lu]", e->fullname, i); switch(t[start].type) { case JSMN_PRIMITIVE: -- cgit v1.2.3