Skip to content

Commit 3e73e02

Browse files
committed
Update PostUpdateNodes for implicit varargs slices
We don't want a post update node for the implicit varargs slice, and we do want one for each argument which is stored in the implicit varargs slice.
1 parent 73b712a commit 3e73e02

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,11 @@ module Public {
732732
or
733733
preupd = getAWrittenNode()
734734
or
735-
preupd instanceof ArgumentNode and
735+
(
736+
preupd instanceof ArgumentNode and not preupd instanceof ImplicitVarargsSlice
737+
or
738+
preupd = any(CallNode c).getImplicitVarargsArgument(_)
739+
) and
736740
mutableType(preupd.getType())
737741
) and
738742
(

0 commit comments

Comments
 (0)