...
Code Block | ||
---|---|---|
| ||
int main(void) { FILE my_stdout = *(stdout); if (fputs("Hello, World!\n", &my_stdout) == EOF) { /* Handle Errorerror */ } return 0; } |
For example, this noncompliant example fails with an "access violation" when compiled under Microsoft Visual Studio 2005 and run under Windows.
...
Code Block | ||
---|---|---|
| ||
int main(void) { FILE *my_stdout = stdout; if (fputs("Hello, World!\n", my_stdout) == EOF) { /* Handle Errorerror */ } return 0; } |
Risk Assessment
...