File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
csharp/ql/lib/semmle/code/csharp/dataflow/internal Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -175,10 +175,19 @@ private module DispatchImpl {
175
175
* restricted to those `call`s for which a context might make a difference.
176
176
*/
177
177
DataFlowCallable viableImplInCallContext ( NonDelegateDataFlowCall call , DataFlowCall ctx ) {
178
- result .getUnderlyingCallable ( ) =
179
- call .getDispatchCall ( )
180
- .getADynamicTargetInCallContext ( ctx .( NonDelegateDataFlowCall ) .getDispatchCall ( ) )
181
- .getUnboundDeclaration ( )
178
+ exists ( DispatchCall dc | dc = call .getDispatchCall ( ) |
179
+ result .getUnderlyingCallable ( ) =
180
+ getCallableForDataFlow ( dc .getADynamicTargetInCallContext ( ctx .( NonDelegateDataFlowCall )
181
+ .getDispatchCall ( ) ) .getUnboundDeclaration ( ) )
182
+ or
183
+ exists ( Callable c , DataFlowCallable encl |
184
+ result .asSummarizedCallable ( ) = c and
185
+ mayBenefitFromCallContext ( call , encl ) and
186
+ encl = ctx .getARuntimeTarget ( ) and
187
+ c = dc .getAStaticTarget ( ) .getUnboundDeclaration ( ) and
188
+ not c instanceof RuntimeCallable
189
+ )
190
+ )
182
191
}
183
192
}
184
193
You can’t perform that action at this time.
0 commit comments