mirror of
https://github.com/github/codeql.git
synced 2026-04-19 14:04:09 +02:00
Golang: fix flow from a map value via a range statement
This commit is contained in:
@@ -57,11 +57,11 @@ predicate containerStoreStep(Node node1, Node node2, Content c) {
|
||||
predicate containerReadStep(Node node1, Node node2, Content c) {
|
||||
c instanceof ArrayContent and
|
||||
(
|
||||
node2.(Read).readsElement(node1, _) and
|
||||
(
|
||||
node1.getType() instanceof ArrayType or
|
||||
node1.getType() instanceof SliceType
|
||||
)
|
||||
node1.getType() instanceof ArrayType or
|
||||
node1.getType() instanceof SliceType
|
||||
) and
|
||||
(
|
||||
node2.(Read).readsElement(node1, _)
|
||||
or
|
||||
node2.(RangeElementNode).getBase() = node1
|
||||
or
|
||||
@@ -85,5 +85,5 @@ predicate containerReadStep(Node node1, Node node2, Content c) {
|
||||
or
|
||||
c instanceof MapValueContent and
|
||||
node1.getType() instanceof MapType and
|
||||
node2.(Read).readsElement(node1, _)
|
||||
(node2.(Read).readsElement(node1, _) or node2.(RangeElementNode).getBase() = node1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user