We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 635a668 commit 3161d11Copy full SHA for 3161d11
cpp/ql/src/experimental/Security/CWE/CWE-243/IncorrectChangingWorkingDirectory.ql
@@ -36,6 +36,7 @@ predicate outExistsChdir(FunctionCall fcp) {
36
fctmp2.getTarget().hasGlobalOrStdName("chdir") or
37
fctmp2.getTarget().hasGlobalOrStdName("fchdir")
38
) and
39
+ // we are looking for a call containing calls chdir and fchdir
40
fctmp2.getEnclosingStmt().getParentStmt*() = fctmp.getTarget().getEntryPoint().getChildStmt*()
41
42
(
0 commit comments