lkml.org 
[lkml]   [2001]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PROPOSAL: dot-proc interface [was: /proc stuff]
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
http://www.m-l.org/~greerga/


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:18    [W:0.204 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site