Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9974087 commit c916bedCopy full SHA for c916bed
1 file changed
cpp/ql/test/experimental/query-tests/Security/CWE/CWE-200/semmle/tests/test1.cpp
@@ -7,11 +7,11 @@ int fclose(FILE *stream);
7
8
int main(int argc, char *argv[])
9
{
10
- //umask(0022);
+ umask(0022);
11
FILE *fp;
12
- fp = fopen("myFile.txt","w"); // BAD
13
- //chmod("myFile.txt",0644);
+ fp = fopen("myFile.txt","w"); // GOOD
+ chmod("myFile.txt",0644);
14
fprintf(fp,"%s\n","data to file");
15
fclose(fp);
16
return 0;
17
-}
+}
0 commit comments