@@ -219,16 +219,14 @@ module RelevantStateConfig implements DataFlow::ConfigSig {
219219
220220module RelevantStateFlow = DataFlow:: Global< RelevantStateConfig > ;
221221
222- predicate relevantState ( DataFlow:: Node sink , Class state ) {
223- exists ( DataFlow:: Node source |
224- RelevantStateFlow:: flow ( source , sink ) and
225- isSourceImpl ( source , state )
226- )
222+ predicate relevantState ( DataFlow:: Node source , DataFlow:: Node sink , Class state ) {
223+ RelevantStateFlow:: flow ( source , sink ) and
224+ isSourceImpl ( source , state )
227225}
228226
229227predicate isSinkImpl ( DataFlow:: Node sink , Class state , Type convertedType , boolean compatible ) {
230228 exists ( UnsafeCast cast |
231- relevantState ( sink , state ) and
229+ relevantState ( _ , sink , state ) and
232230 sink .asExpr ( ) = cast .getUnconverted ( ) and
233231 convertedType = cast .getConvertedType ( )
234232 |
@@ -245,10 +243,10 @@ predicate isSinkImpl(DataFlow::Node sink, Class state, Type convertedType, boole
245243 */
246244module BadConfig implements DataFlow:: StateConfigSig {
247245 class FlowState extends Class {
248- FlowState ( ) { relevantState ( _, this ) }
246+ FlowState ( ) { relevantState ( _, _ , this ) }
249247 }
250248
251- predicate isSource ( DataFlow:: Node source , FlowState state ) { isSourceImpl ( source , state ) }
249+ predicate isSource ( DataFlow:: Node source , FlowState state ) { relevantState ( source , _ , state ) }
252250
253251 predicate isBarrier ( DataFlow:: Node node ) { RelevantStateConfig:: isBarrier ( node ) }
254252
0 commit comments