allocating logger-test's buffer with calloc
fucking Uninitialised value was created by a heap allocation
This commit is contained in:
parent
edc78674d2
commit
59ba4c8d08
@ -50,7 +50,7 @@ int main(void)
|
|||||||
rewind(fileBuffer); //REWIND fileBuffer (NO SHIT)
|
rewind(fileBuffer); //REWIND fileBuffer (NO SHIT)
|
||||||
|
|
||||||
//SET LENGTH OF buffer
|
//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
|
//LOAD jsonFile
|
||||||
(void) (fread(buffer, bufferSize, 1, fileBuffer) + 1); //TODO: Try to create some function for processing exit value
|
(void) (fread(buffer, bufferSize, 1, fileBuffer) + 1); //TODO: Try to create some function for processing exit value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user