...
Code Block | ||
---|---|---|
| ||
int main(void) { FILE my_stdout = *(stdout); if (fputs("Hello, World!\n", &my_stdout); == EOF) { /* Handle Error */ } return 0; } |
For example, this non-compliant 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 Error */ } return 0; } |
Risk Assessment
...