mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: Make improvements to getArgString based on PR comments
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user