allocating logger-test's buffer with calloc

fucking Uninitialised value was created by a heap allocation
This commit is contained in:
Václav Šmejkal 2022-12-10 15:27:35 +01:00
parent edc78674d2
commit 59ba4c8d08
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19

View File

@ -50,7 +50,7 @@ int main(void)
rewind(fileBuffer); //REWIND fileBuffer (NO SHIT)
//SET LENGTH OF buffer
buffer = malloc(bufferSize + 1);
buffer = calloc(bufferSize + 1, sizeof(buffer)); //CALLOC IS USED BECAUSE OF LE 'Uninitialised value was created by a heap allocation'
//LOAD jsonFile
(void) (fread(buffer, bufferSize, 1, fileBuffer) + 1); //TODO: Try to create some function for processing exit value