Skip to content

Commit d57160d

Browse files
committed
Direct map stores via a post-update node
1 parent 7ed73bc commit d57160d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ predicate containerStoreStep(Node node1, Node node2, Content c) {
4141
or
4242
c instanceof MapKeyContent and
4343
node2.getType() instanceof MapType and
44-
exists(Write w | w.writesElement(node2, node1, _))
44+
exists(Write w | w.writesElement(node2.(PostUpdateNode).getPreUpdateNode(), node1, _))
4545
or
4646
c instanceof MapValueContent and
4747
node2.getType() instanceof MapType and
48-
exists(Write w | w.writesElement(node2, _, node1))
48+
exists(Write w | w.writesElement(node2.(PostUpdateNode).getPreUpdateNode(), _, node1))
4949
}
5050

5151
/**

0 commit comments

Comments
 (0)