in reply to Re: Bad code from the trenches
in thread Bad code from the trenches
How big is FILE? Why are you reading it completely into RAM before using it?Fix: Iterate over FILE in a while-loop.
And that only works if the file has reasonably long lines. You are still in trouble if they give you '/dev/zero' as the filename. Even if the files can not be picked from a list, at least the program should ensure that they are located in a "reasonable" directory.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Bad code from the trenches
by dragonchild (Archbishop) on Mar 18, 2005 at 13:57 UTC | |
by itub (Priest) on Mar 18, 2005 at 20:37 UTC |