Skip to content

Commit 45ddb48

Browse files
committed
CPP: Make wordexp take an indirect argument.
1 parent a2f2b6c commit 45ddb48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-078/WordexpTainted.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module WordexpTaintConfig implements DataFlow::ConfigSig {
4040

4141
predicate isSink(DataFlow::Node sink) {
4242
exists(FunctionCall fc | fc.getTarget() instanceof WordexpFunction |
43-
fc.getArgument(0) = sink.asExpr() and
43+
fc.getArgument(0) = sink.asIndirectArgument(1) and
4444
not isCommandSubstitutionDisabled(fc)
4545
)
4646
}

0 commit comments

Comments
 (0)