added on byte to writeLog's buffer allocation

I mean... Valgrind told me to.
This commit is contained in:
Václav Šmejkal 2022-11-22 18:50:41 +01:00
parent 0f4492a611
commit 48977c0fe1
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19

View File

@ -57,7 +57,7 @@ int initLogger(char *directoryPath)
void writeLog(int loggerFile, char *logMessage)
{
//VARIABLES
char *buffer = malloc(strlen(WRITE_FORMAT) + strlen(logMessage) + 1);
char *buffer = malloc(strlen(WRITE_FORMAT) + strlen(logMessage) + 2);
time_t timeL = time(NULL);
struct tm tm = *localtime(&timeL);