Name: Anonymous 2010-12-28 7:18
./shit.c:284: Medium: fgetc
Check buffer boundaries if calling this function in a loop
and make sure you are not in danger of writing past the allocated space.
./shit.c:284:9: [1] (buffer) fgetc:
Check buffer boundaries if used in a loop.
Check buffer boundaries if calling this function in a loop
and make sure you are not in danger of writing past the allocated space.
./shit.c:284:9: [1] (buffer) fgetc:
Check buffer boundaries if used in a loop.
/* there's a reason for using this sizing, don't hate */
unsigned int textfilesize(FILE *stream)
{
auto unsigned int counter;
counter = 0;
while (fgetc(stream) != EOF)
counter++;
rewind(stream); /* fseek(stream, 0L, SEEK_SET); */
return counter;
}