Skip to content

Commit 8d35db0

Browse files
committed
Making argv filter positional.
1 parent 639642f commit 8d35db0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ predicate isNonConst(DataFlow::Node node) {
7272
p = node.asParameter() and
7373
// Ignore main's argv parameter as it is already considered a `FlowSource`
7474
// not ignoring it will result in path redundancies
75-
(f.getName() = "main" implies p.getName() != "argv")
75+
(f.getName() = "main" implies p != f.getParameter(1))
7676
)
7777
or
7878
// Consider as an input any out arg of a function or a function's return where the function is not:

0 commit comments

Comments
 (0)