summaryrefslogtreecommitdiffstats
path: root/libnetdata
diff options
context:
space:
mode:
Diffstat (limited to 'libnetdata')
-rw-r--r--libnetdata/json/json.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libnetdata/json/json.c b/libnetdata/json/json.c
index c9ff39b056..7c5adca3db 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:
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273