diff --git a/src/logger/lib/logger.c b/src/logger/lib/logger.c index 3eeb06b..bdd60f0 100644 --- a/src/logger/lib/logger.c +++ b/src/logger/lib/logger.c @@ -131,7 +131,7 @@ void writeLog(int loggerFile, char *logMessage) message = strdup(logMessage); //COPY } - buffer = malloc(strlen(WRITE_FORMAT) + strlen(message) + 2); //ALLOCATE + buffer = malloc(strlen(WRITE_FORMAT) + strlen(message) + 3); //ALLOCATE sprintf(buffer, WRITE_FORMATTING, tm.tm_hour, tm.tm_min, tm.tm_sec, message); //LOAD MESSAGE