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

Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
This commit is contained in:
ihsinme
2021-11-15 21:08:11 +03:00
committed by GitHub
parent f102fa1d33
commit 0359c381e1

View File

@@ -6,7 +6,7 @@
...
fchmod(fileno(fp), 0555 - cmusk); // BAD
...
fchmod(fileno(fp), 0555 & ~curumsk); // GOOD
fchmod(fileno(fp), 0555 & ~maskOut); // GOOD
...
umask(0666);
chmod(pathname, 0666); // BAD