Skip to content

Commit 39b430a

Browse files
committed
[DIFF-INFORMED] C++: IteratorToExpiredContainer
1 parent ec85e55 commit 39b430a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cpp/ql/src/Security/CWE/CWE-416/IteratorToExpiredContainer.ql

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,18 @@ module Config implements DataFlow::StateConfigSig {
145145
// ```
146146
result instanceof DataFlow::FeatureHasSinkCallContext
147147
}
148+
149+
predicate observeDiffInformedIncrementalMode() { any() }
150+
151+
Location getASelectedSourceLocation(DataFlow::Node source) { none() }
152+
153+
Location getASelectedSinkLocation(DataFlow::Node sink) {
154+
exists(DataFlow::Node mid, FlowState state | result = mid.getLocation() |
155+
destroyedToBeginSink(sink) and
156+
isSink(sink, state) and
157+
state = Config::DestroyedToBegin(mid)
158+
)
159+
}
148160
}
149161

150162
module Flow = DataFlow::GlobalWithState<Config>;

0 commit comments

Comments
 (0)