Skip to content

Commit 279b2c7

Browse files
authored
Merge pull request github#16457 from owen-mc/go/fix-implicitvarargsslice-type
Go: Fix `getType` on `ImplicitVarArgsSlice`
2 parents 0cbedfb + 4d42a88 commit 279b2c7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Fixed a bug that stopped data flow from being followed through variadic arguments to built-in functions or to functions called using a variable.

go/ql/lib/semmle/go/dataflow/internal/DataFlowNodes.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,8 @@ module Public {
455455
CallNode getCallNode() { result = call }
456456

457457
override Type getType() {
458-
exists(Function f | f = call.getTarget() |
459-
result = f.getParameterType(f.getNumParameter() - 1)
458+
exists(SignatureType t | t = call.getCall().getCalleeType() |
459+
result = t.getParameterType(t.getNumParameter() - 1)
460460
)
461461
}
462462

0 commit comments

Comments
 (0)