On Mon, 13 Mar 2000, J. David Bryan wrote:

> On 13 Mar 2000, at 11:45, Eli Zaretskii wrote:
> 
> > If the actual file only has 100 bytes, why is this incorrect?
> 
> How do you know the actual file only has 100 bytes?  As you suggested, the 
> file might grow between the stat call (that sizes the buffer) and the read 
> call.

I'm not arguing that the current code in makeinfo is 100% fool-proof.  I 
am arguing that if the read call reads only 100 characters, and if, by 
some magic, the programmer *knows* that will happen, it should be okay to 
ask for 200 bytes, and the read call should not bomb on us.

Reply via email to