@@ -77,7 +77,7 @@ DataFlow::Node getADestroyedNode() {
77
77
)
78
78
}
79
79
80
- predicate isSinkImpl ( DataFlow:: Node sink , FunctionCall fc ) {
80
+ predicate destroyedToBeginSink ( DataFlow:: Node sink , FunctionCall fc ) {
81
81
exists ( CallInstruction call |
82
82
call = sink .asOperand ( ) .( ThisArgumentOperand ) .getCall ( ) and
83
83
fc = call .getUnconvertedResultExpression ( ) and
@@ -91,7 +91,7 @@ predicate isSinkImpl(DataFlow::Node sink, FunctionCall fc) {
91
91
module DestroyedToBeginConfig implements DataFlow:: ConfigSig {
92
92
predicate isSource ( DataFlow:: Node source ) { source = getADestroyedNode ( ) }
93
93
94
- predicate isSink ( DataFlow:: Node sink ) { isSinkImpl ( sink , _) }
94
+ predicate isSink ( DataFlow:: Node sink ) { destroyedToBeginSink ( sink , _) }
95
95
96
96
DataFlow:: FlowFeature getAFeature ( ) {
97
97
// By blocking argument-to-parameter flow we ensure that we don't enter a
@@ -111,5 +111,5 @@ module DestroyedToBeginConfig implements DataFlow::ConfigSig {
111
111
module DestroyedToBeginFlow = DataFlow:: Global< DestroyedToBeginConfig > ;
112
112
113
113
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 )
115
115
select source , "This object is destroyed before $@ is called." , beginOrEnd , beginOrEnd .toString ( )
0 commit comments