From 77ae6e1cf6b8dd56e43cf5505714410ad2e59d73 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Tue, 22 Nov 2022 19:40:49 +0100 Subject: [PATCH] added NULL character at the end of buffer in misc when reading versions.json --- src/core/lib/misc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/lib/misc.c b/src/core/lib/misc.c index 40c2692..7ca0ee6 100644 --- a/src/core/lib/misc.c +++ b/src/core/lib/misc.c @@ -125,6 +125,8 @@ boolean checkVersion() //LOAD jsonFile fread(buffer, bufferSize, 1, fileBuffer); + buffer[bufferSize] = '\0'; + //CHECK FOR TEXT IN buffer if (strcmp(buffer, "") == 0) {