Re: PROPOSAL: dot-proc interface [was: /proc stuff]

George Greer
2001-11-07T01:07:20Z

On Tue, 6 Nov 2001 dank@trellisinc.com wrote:

>In article <20011105155955.A16505@codepoet.org> Erik Anderson wrote:
>> Come now, it really isn't that difficult:
>
>> char name[80];
>> if (sscanf(line, "%4u %4u %llu %s", &major, &minor, &size, name) == 4)
>
>if it's so easy to do, why do you have a great big buffer overflow here?

Because he forgot about "%80s"? But if he forgot that he may accidently
use strcpy, strcat, and gets, so...

Or maybe it was just an exercise for the reader?

--
George Greer, greerga@m-l.org