/*
* Rule: FIO05-C
* Source: wiki
* Status: FAIL - Should trigger FIO05-C violation
*/
char *file_name;
/* Initialize file_name */
FILE *fd = ;
if
/*... Write to file ...*/
;
fd = NULL;
/*
* A race condition here allows for an attacker
* to switch out the file for another.
*/
/* ... */
fd = ;
if
/*... Read from file ...*/
;
fd = NULL;