Skip to content

Commit c175f0a

Browse files
authored
Update IncorrectChangingWorkingDirectory.ql
1 parent 62b3c3c commit c175f0a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ predicate inExistsChdir(FunctionCall fcp) {
2222
fctmp.getTarget().hasGlobalOrStdName("fchdir")
2323
) and
2424
(
25-
fctmp.getASuccessor*() = fcp or
26-
fcp.getASuccessor*() = fctmp
25+
fcp.getBasicBlock().getASuccessor*() = fctmp.getBasicBlock() or
26+
fctmp.getBasicBlock().getASuccessor*() = fcp.getBasicBlock()
2727
)
2828
)
2929
}
@@ -40,8 +40,8 @@ predicate outExistsChdir(FunctionCall fcp) {
4040
fctmp2.getEnclosingStmt().getParentStmt*() = fctmp.getTarget().getEntryPoint().getChildStmt*()
4141
) and
4242
(
43-
fctmp.getASuccessor*() = fcp or
44-
fcp.getASuccessor*() = fctmp
43+
fcp.getBasicBlock().getASuccessor*() = fctmp.getBasicBlock() or
44+
fctmp.getBasicBlock().getASuccessor*() = fcp.getBasicBlock()
4545
)
4646
)
4747
}

0 commit comments

Comments
 (0)