C++: Fix placeholder syntax in training example

This commit is contained in:
Aditya Sharad
2020-06-22 12:26:26 -07:00
committed by GitHub
parent 95f8ba433e
commit 915148f82c

View File

@@ -2,11 +2,11 @@ import cpp
import semmle.code.cpp.dataflow.DataFlow
import semmle.code.cpp.commons.Printf
class SourceNode extends DataFlow::Node { ... }
class SourceNode extends DataFlow::Node { /* ... */ }
from FormattingFunction f, Call c, SourceNode src, DataFlow::Node arg
where c.getTarget() = f and
arg.asExpr() = c.getArgument(f.getFormatParameterIndex()) and
DataFlow::localFlow(src, arg) and
not src.asExpr() instanceof StringLiteral
select arg, "Non-constant format string."
select arg, "Non-constant format string."