Skip to content

Commit e1c85e3

Browse files
committed
Fix elementWrite to include flow summaries
1 parent 8cc9838 commit e1c85e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ predicate referenceStep(DataFlow::Node pred, DataFlow::Node succ) {
140140
*/
141141
predicate elementWriteStep(DataFlow::Node pred, DataFlow::Node succ) {
142142
any(DataFlow::Write w).writesElement(succ.(DataFlow::PostUpdateNode).getPreUpdateNode(), _, pred)
143+
or
144+
FlowSummaryImpl::Private::Steps::summaryStoreStep(pred.(DataFlowPrivate::FlowSummaryNode)
145+
.getSummaryNode(), any(DataFlow::Content c | c instanceof DataFlow::ArrayContent),
146+
succ.(DataFlowPrivate::FlowSummaryNode).getSummaryNode())
143147
}
144148

145149
/** Holds if taint flows from `pred` to `succ` via a field read. */

0 commit comments

Comments
 (0)