|
|
|
|
|
by a1369209993
2336 days ago
|
|
> One example shows [...] Yes, printf("Hello, World!\n");
shows an awareness of the security issue and good habit being used. printf("%s\n", "Hello, World!");
shows that you think "%s\n\0Hello, World!" (or however the compiler decides to lay out those strings) can't be overwritten with "%p%nHello, World!" (or something to that effect), but "Hello, World!\n" somehow can. |
|
We've spent the last 20 years cleaning up after the shoddy work of this exact attitude.