Name: Anonymous 2007-04-10 3:25 ID:oSbmDWg8
Is it possible to write code in C and not be vulnerable to buffer overflows? Or is this a fool's errand?
char buffer[100]; // 100 bytes storage here
fgets(buffer, 100, stdin); // no buffer overflowschar buffer[10000]; // 10.000 bytes storage here
scanf("%s", buffer); // here's the BoF part..
[anonymous@post ~]$ gcc bof.c -o bof
[anonymous@post ~]$ ./bof `perl -e 'print "A"x10001'`