Skip to content

Commit ea1d18e

Browse files
authored
Update IncorrectPrivilegeAssignment.cpp
1 parent 41e15cd commit ea1d18e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-266/IncorrectPrivilegeAssignment.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
...
22
umask(0); // BAD
33
...
4-
cmusk = umask(S_IRWXG | S_IRWXO); // GOOD
4+
maskOut = S_IRWXG | S_IRWXO;
5+
umask(maskOut); // GOOD
56
...
67
fchmod(fileno(fp), 0555 - cmusk); // BAD
78
...

0 commit comments

Comments
 (0)