From ab9b46e75ae5ca067a09ae6359fb300440aba79b Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sun, 11 Dec 2022 16:32:36 +0100 Subject: [PATCH] made cleaning buffer in version check smarter I think my IQ raised by -10 --- src/core/lib/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/misc.c b/src/core/lib/misc.c index 9a603dd..59e57e2 100644 --- a/src/core/lib/misc.c +++ b/src/core/lib/misc.c @@ -140,7 +140,7 @@ boolean checkVersion(void) buffer = malloc(bufferSize + 1); //FIX buffer - strcpy(buffer, ""); + memset(buffer, '\0', bufferSize); //LOAD jsonFile (void) (fread(buffer, bufferSize, 1, fileBuffer) + 1); //TODO: Try to create some function for processing exit value