diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll index ad5d8a167b1..62dd14b9771 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll @@ -538,6 +538,7 @@ private module Cached { numberOfLoads >= 0 and isUse(_, iteratorDerefAddress, iteratorBase, numberOfLoads + 2, 0) and iteratorBase.getResultType() instanceof Interfaces::Iterator and + load.getSourceAddressOperand() = iteratorDerefAddress and read.getPrimaryInstruction() = load.getSourceAddress() and memory = read.getSideEffectOperand().getAnyDef() )