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 9b8b916 commit 738354bCopy full SHA for 738354b
cpp/ql/src/experimental/Security/CWE/CWE-243/IncorrectChangingWorkingDirectory.ql
@@ -63,11 +63,7 @@ where
63
fc.getTarget().hasGlobalOrStdName("chdir") or
64
fc.getTarget().hasGlobalOrStdName("fchdir")
65
) and
66
- not exists(ConditionalStmt cotmp | cotmp.getControllingExpr().getAChild*() = fc) and
67
- not exists(Loop lptmp | lptmp.getCondition().getAChild*() = fc) and
68
- not exists(ReturnStmt rttmp | rttmp.getExpr().getAChild*() = fc) and
69
- not exists(Assignment astmp | astmp.getAChild*() = fc) and
70
- not exists(Initializer ittmp | ittmp.getExpr().getAChild*() = fc) and
+ fc instanceof ExprInVoidContext
71
not isFromMacroDefinition(fc) and
72
msg = "Unchecked return value for call to '" + fc.getTarget().getName() + "'."
73
select fc, msg
0 commit comments