mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Update test1.cpp
This commit is contained in:
@@ -7,11 +7,11 @@ int fclose(FILE *stream);
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
//umask(0022);
|
||||
umask(0022);
|
||||
FILE *fp;
|
||||
fp = fopen("myFile.txt","w"); // BAD
|
||||
//chmod("myFile.txt",0644);
|
||||
fp = fopen("myFile.txt","w"); // GOOD
|
||||
chmod("myFile.txt",0644);
|
||||
fprintf(fp,"%s\n","data to file");
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user