How come they did not get a warning?
Posted Feb 2, 2012 15:20 UTC (Thu) by
rvfh (subscriber, #31018)
Parent article:
Format string vulnerabilities
Apparently Ubuntu forces -Wformat-security by default, as documented here, meaning that GCC will complain if I do that:
$ cat main.c
#include <stdio.h>
int main(void) {
const char* str = "Hello, world";
printf(str);
return 0;
}
$ gcc main.c
main.c: In function ‘main’:
main.c:5:2: warning: format not a string literal and no format arguments [-Wformat-security]
I suppose Fedora and SuSE do the same, so my question is: what do the sudo developers compile on? And which warnings do they use? Or more importantly: how do they react when a warning appears? In my experience, warnings have a strong smell of mushrooms bugs.
(
Log in to post comments)