Skip to content

Commit 0f0bd34

Browse files
authored
Update IncorrectPrivilegeAssignment.ql
1 parent 88634b8 commit 0f0bd34

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ where
5353
fctmp.getTarget().hasGlobalOrStdName("fopen") or
5454
fctmp.getTarget().hasGlobalOrStdName("open")
5555
) and
56+
not fctmp.getArgument(1).getValue().matches("r%") and
5657
fctmp.getNumberOfArguments() = 2 and
5758
not fctmp.getArgument(0).getValue() = "/dev/null" and
5859
fcsnd = fctmp

0 commit comments

Comments
 (0)