in reply to Uncontrolled Memory Allocation Error
The problem again is that you are reading from input that could be controlled by a user.
A user might create a file with a line length that is longer than your machine or your application expects. If the user submits such a file to your program, it will try to read aa line (in the while loop) and will read "too much" data.
To prevent that, you could limit the number of bytes that your program reads from a file at a time, for example by using read instead of readpipe (<UNFILE>).
|
|---|