Skip to content

Commit

Permalink
Re-add removed malloc call, apparently required on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgtaylor committed Jul 14, 2014
1 parent 0a5e747 commit 2398bc0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ long readFile(char *name, void **buffer) {
}
}

*buffer = malloc(sizeof chunk);
while ((bytesRead = fread(chunk, 1, sizeof chunk, file)) > 0) {
unsigned char *reallocated = realloc(*buffer, fileLen + bytesRead);
if (reallocated) {
Expand Down

0 comments on commit 2398bc0

Please sign in to comment.