func: void bad() wchar_t * data ; wchar_t dataBuffer [ FILENAME_MAX ] = L "" data = dataBuffer; if ( globalReturnsTrueOrFalse ( ) )  int globalReturnsTrueOrFalse() return ( rand ( ) % 2 ) ; size_t dataLen = wcslen ( data ) ; wcsncat ( data + dataLen , environment , FILENAME_MAX - dataLen - 1 ); wcscat ( data , L "c:\\temp\\file.txt" ) pFile = FOPEN ( data , L "wb+" ) if ( pFile != NULL )  fclose ( pFile ); 