Skip to content

Commit 96ba3ec

Browse files
committed
C++: Rename predicate.
1 parent eb2790a commit 96ba3ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ DataFlow::Node getADestroyedNode() {
7777
)
7878
}
7979

80-
predicate isSinkImpl(DataFlow::Node sink, FunctionCall fc) {
80+
predicate destroyedToBeginSink(DataFlow::Node sink, FunctionCall fc) {
8181
exists(CallInstruction call |
8282
call = sink.asOperand().(ThisArgumentOperand).getCall() and
8383
fc = call.getUnconvertedResultExpression() and
@@ -91,7 +91,7 @@ predicate isSinkImpl(DataFlow::Node sink, FunctionCall fc) {
9191
module DestroyedToBeginConfig implements DataFlow::ConfigSig {
9292
predicate isSource(DataFlow::Node source) { source = getADestroyedNode() }
9393

94-
predicate isSink(DataFlow::Node sink) { isSinkImpl(sink, _) }
94+
predicate isSink(DataFlow::Node sink) { destroyedToBeginSink(sink, _) }
9595

9696
DataFlow::FlowFeature getAFeature() {
9797
// By blocking argument-to-parameter flow we ensure that we don't enter a
@@ -111,5 +111,5 @@ module DestroyedToBeginConfig implements DataFlow::ConfigSig {
111111
module DestroyedToBeginFlow = DataFlow::Global<DestroyedToBeginConfig>;
112112

113113
from DataFlow::Node source, DataFlow::Node sink, FunctionCall beginOrEnd
114-
where DestroyedToBeginFlow::flow(source, sink) and isSinkImpl(sink, beginOrEnd)
114+
where DestroyedToBeginFlow::flow(source, sink) and destroyedToBeginSink(sink, beginOrEnd)
115115
select source, "This object is destroyed before $@ is called.", beginOrEnd, beginOrEnd.toString()

0 commit comments

Comments
 (0)