Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c916bed

Browse files
authored
Update test1.cpp
1 parent 9974087 commit c916bed

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/semmle/tests

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/semmle/tests/test1.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ int fclose(FILE *stream);
77

88
int main(int argc, char *argv[])
99
{
10-
//umask(0022);
10+
umask(0022);
1111
FILE *fp;
12-
fp = fopen("myFile.txt","w"); // BAD
13-
//chmod("myFile.txt",0644);
12+
fp = fopen("myFile.txt","w"); // GOOD
13+
chmod("myFile.txt",0644);
1414
fprintf(fp,"%s\n","data to file");
1515
fclose(fp);
1616
return 0;
17-
}
17+
}

0 commit comments

Comments
 (0)