Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

GetFileContents now clears the memory before use, just to be a tad mo…

…re paranoid.
  • Loading branch information...
commit 92630440d27c63e10486a101bb3a372e8bf9c20b 1 parent 4f457cf
@uliwitness authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  GetFileContents.c
View
2  GetFileContents.c
@@ -44,7 +44,7 @@ char* GetFileContents( const char* fname )
fseek( theFile, 0, SEEK_END );
int len = ftell( theFile ),
readbytes;
- char* codeStr = (char*) malloc( len +1 );
+ char* codeStr = (char*) calloc( len +1, sizeof(char) );
// Rewind and read in whole file:
fseek( theFile, 0, SEEK_SET );
Please sign in to comment.
Something went wrong with that request. Please try again.