Update IncorrectChangingWorkingDirectory.ql

This commit is contained in:
ihsinme
2021-10-30 13:47:22 +03:00
committed by GitHub
parent 635a668670
commit 3161d112d1

View File

@@ -36,6 +36,7 @@ predicate outExistsChdir(FunctionCall fcp) {
fctmp2.getTarget().hasGlobalOrStdName("chdir") or
fctmp2.getTarget().hasGlobalOrStdName("fchdir")
) and
// we are looking for a call containing calls chdir and fchdir
fctmp2.getEnclosingStmt().getParentStmt*() = fctmp.getTarget().getEntryPoint().getChildStmt*()
) and
(