(svn r24429) -Change: add some hardening flags to the compiler for release builds

This commit is contained in:
rubidium
2012-07-22 05:33:09 +00:00
parent 3202b09b12
commit 990c9f8a7f
2 changed files with 18 additions and 9 deletions

View File

@@ -910,7 +910,10 @@ int main(int argc, char *argv[])
size = ftell(src);
rewind(src);
content = (char*)malloc(size * sizeof(*content));
fread(content, 1, size, src);
if (fread(content, 1, size, src) != (size_t)size) {
fprintf(stderr, "Could not read %s\n", filename);
exit(-2);
}
fclose(src);
}