Skip to content

Commit

Permalink
Rust: Make improvements to getArgString based on PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
paldepind committed Nov 12, 2024
1 parent cd2038a commit d9d3027
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rust/ql/test/utils/InlineFlowTest.qll
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ private module FlowTestImpl implements InputSig<Location, RustDataFlow> {
result = src.asExpr().(CallExpr).getArgList().getArg(0).toString()
}

bindingset[src, sink]
string getArgString(DataFlow::Node src, DataFlow::Node sink) {
(if exists(getSourceArgString(src)) then result = getSourceArgString(src) else result = "") and
(
result = getSourceArgString(src)
or
not exists(getSourceArgString(src)) and result = ""
) and
exists(sink)
}

Expand Down

0 comments on commit d9d3027

Please sign in to comment.