Skip to content

Commit 3161d11

Browse files
authored
Update IncorrectChangingWorkingDirectory.ql
1 parent 635a668 commit 3161d11

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-243/IncorrectChangingWorkingDirectory.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ predicate outExistsChdir(FunctionCall fcp) {
3636
fctmp2.getTarget().hasGlobalOrStdName("chdir") or
3737
fctmp2.getTarget().hasGlobalOrStdName("fchdir")
3838
) and
39+
// we are looking for a call containing calls chdir and fchdir
3940
fctmp2.getEnclosingStmt().getParentStmt*() = fctmp.getTarget().getEntryPoint().getChildStmt*()
4041
) and
4142
(

0 commit comments

Comments
 (0)