Skip to content

Commit 8b424d1

Browse files
authored
Merge pull request github#10505 from hvitved/dataflow/viable-impl-in-ctx-consistency
Data flow: Guard against `viableImplInCallContext` not being a subset of `viableCallable`
2 parents cee0e8e + 914c711 commit 8b424d1

File tree

43 files changed

+175
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+175
-12
lines changed

cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ private module Cached {
709709
*/
710710
pragma[nomagic]
711711
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
712-
result = viableImplInCallContext(call, ctx)
712+
result = viableImplInCallContext(call, ctx) and
713+
result = viableCallable(call)
713714
or
714715
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
715716
or

cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ module Consistency {
3838

3939
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
4040
predicate uniquePostUpdateExclude(Node n) { none() }
41+
42+
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
43+
predicate viableImplInCallContextTooLargeExclude(
44+
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
45+
) {
46+
none()
47+
}
4148
}
4249

4350
private class RelevantNode extends Node {
@@ -217,4 +224,12 @@ module Consistency {
217224
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
218225
msg = "PostUpdateNode should not be the target of local flow."
219226
}
227+
228+
query predicate viableImplInCallContextTooLarge(
229+
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
230+
) {
231+
callable = viableImplInCallContext(call, ctx) and
232+
not callable = viableCallable(call) and
233+
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
234+
}
220235
}

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ private module Cached {
709709
*/
710710
pragma[nomagic]
711711
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
712-
result = viableImplInCallContext(call, ctx)
712+
result = viableImplInCallContext(call, ctx) and
713+
result = viableCallable(call)
713714
or
714715
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
715716
or

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ module Consistency {
3838

3939
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
4040
predicate uniquePostUpdateExclude(Node n) { none() }
41+
42+
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
43+
predicate viableImplInCallContextTooLargeExclude(
44+
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
45+
) {
46+
none()
47+
}
4148
}
4249

4350
private class RelevantNode extends Node {
@@ -217,4 +224,12 @@ module Consistency {
217224
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
218225
msg = "PostUpdateNode should not be the target of local flow."
219226
}
227+
228+
query predicate viableImplInCallContextTooLarge(
229+
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
230+
) {
231+
callable = viableImplInCallContext(call, ctx) and
232+
not callable = viableCallable(call) and
233+
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
234+
}
220235
}

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ private module Cached {
709709
*/
710710
pragma[nomagic]
711711
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
712-
result = viableImplInCallContext(call, ctx)
712+
result = viableImplInCallContext(call, ctx) and
713+
result = viableCallable(call)
713714
or
714715
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
715716
or

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ module Consistency {
3838

3939
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
4040
predicate uniquePostUpdateExclude(Node n) { none() }
41+
42+
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
43+
predicate viableImplInCallContextTooLargeExclude(
44+
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
45+
) {
46+
none()
47+
}
4148
}
4249

4350
private class RelevantNode extends Node {
@@ -217,4 +224,12 @@ module Consistency {
217224
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
218225
msg = "PostUpdateNode should not be the target of local flow."
219226
}
227+
228+
query predicate viableImplInCallContextTooLarge(
229+
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
230+
) {
231+
callable = viableImplInCallContext(call, ctx) and
232+
not callable = viableCallable(call) and
233+
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
234+
}
220235
}

cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ postWithInFlow
8787
| test.cpp:465:3:465:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
8888
| test.cpp:465:4:465:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. |
8989
| test.cpp:470:22:470:22 | x [inner post update] | PostUpdateNode should not be the target of local flow. |
90+
viableImplInCallContextTooLarge

cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,3 +627,4 @@ postWithInFlow
627627
| true_upon_entry.cpp:98:7:98:7 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
628628
| true_upon_entry.cpp:101:18:101:18 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
629629
| true_upon_entry.cpp:102:5:102:5 | x [post update] | PostUpdateNode should not be the target of local flow. |
630+
viableImplInCallContextTooLarge

cpp/ql/test/library-tests/dataflow/fields/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,4 @@ postWithInFlow
155155
| simple.cpp:92:7:92:7 | i [post update] | PostUpdateNode should not be the target of local flow. |
156156
| struct_init.c:24:11:24:12 | ab [inner post update] | PostUpdateNode should not be the target of local flow. |
157157
| struct_init.c:36:17:36:24 | nestedAB [inner post update] | PostUpdateNode should not be the target of local flow. |
158+
viableImplInCallContextTooLarge

cpp/ql/test/library-tests/dataflow/fields/dataflow-ir-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,3 +1323,4 @@ postWithInFlow
13231323
| struct_init.c:46:16:46:24 | FieldAddress [post update] | PostUpdateNode should not be the target of local flow. |
13241324
| struct_init.c:46:16:46:24 | pointerAB [post update] | PostUpdateNode should not be the target of local flow. |
13251325
| struct_init.c:46:16:46:24 | pointerAB [post update] | PostUpdateNode should not be the target of local flow. |
1326+
viableImplInCallContextTooLarge

cpp/ql/test/library-tests/syntax-zoo/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,4 @@ postWithInFlow
124124
| static_init_templates.cpp:3:2:3:4 | ref [post update] | PostUpdateNode should not be the target of local flow. |
125125
| static_init_templates.cpp:21:2:21:4 | val [post update] | PostUpdateNode should not be the target of local flow. |
126126
| try_catch.cpp:7:8:7:8 | call to exception | PostUpdateNode should not be the target of local flow. |
127+
viableImplInCallContextTooLarge

cpp/ql/test/library-tests/syntax-zoo/dataflow-ir-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2710,3 +2710,4 @@ postWithInFlow
27102710
| whilestmt.c:11:5:11:8 | done [post update] | PostUpdateNode should not be the target of local flow. |
27112711
| whilestmt.c:40:7:40:7 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
27122712
| whilestmt.c:42:7:42:7 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
2713+
viableImplInCallContextTooLarge

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,19 @@ private module DispatchImpl {
175175
* restricted to those `call`s for which a context might make a difference.
176176
*/
177177
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+
)
182191
}
183192
}
184193

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ private module Cached {
709709
*/
710710
pragma[nomagic]
711711
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
712-
result = viableImplInCallContext(call, ctx)
712+
result = viableImplInCallContext(call, ctx) and
713+
result = viableCallable(call)
713714
or
714715
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
715716
or

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImplConsistency.qll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ module Consistency {
3838

3939
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
4040
predicate uniquePostUpdateExclude(Node n) { none() }
41+
42+
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
43+
predicate viableImplInCallContextTooLargeExclude(
44+
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
45+
) {
46+
none()
47+
}
4148
}
4249

4350
private class RelevantNode extends Node {
@@ -217,4 +224,12 @@ module Consistency {
217224
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
218225
msg = "PostUpdateNode should not be the target of local flow."
219226
}
227+
228+
query predicate viableImplInCallContextTooLarge(
229+
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
230+
) {
231+
callable = viableImplInCallContext(call, ctx) and
232+
not callable = viableCallable(call) and
233+
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
234+
}
220235
}

java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ private module Cached {
709709
*/
710710
pragma[nomagic]
711711
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
712-
result = viableImplInCallContext(call, ctx)
712+
result = viableImplInCallContext(call, ctx) and
713+
result = viableCallable(call)
713714
or
714715
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
715716
or

java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplConsistency.qll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ module Consistency {
3838

3939
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
4040
predicate uniquePostUpdateExclude(Node n) { none() }
41+
42+
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
43+
predicate viableImplInCallContextTooLargeExclude(
44+
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
45+
) {
46+
none()
47+
}
4148
}
4249

4350
private class RelevantNode extends Node {
@@ -217,4 +224,12 @@ module Consistency {
217224
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
218225
msg = "PostUpdateNode should not be the target of local flow."
219226
}
227+
228+
query predicate viableImplInCallContextTooLarge(
229+
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
230+
) {
231+
callable = viableImplInCallContext(call, ctx) and
232+
not callable = viableCallable(call) and
233+
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
234+
}
220235
}

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplCommon.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ private module Cached {
709709
*/
710710
pragma[nomagic]
711711
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
712-
result = viableImplInCallContext(call, ctx)
712+
result = viableImplInCallContext(call, ctx) and
713+
result = viableCallable(call)
713714
or
714715
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
715716
or

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImplConsistency.qll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ module Consistency {
3838

3939
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
4040
predicate uniquePostUpdateExclude(Node n) { none() }
41+
42+
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
43+
predicate viableImplInCallContextTooLargeExclude(
44+
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
45+
) {
46+
none()
47+
}
4148
}
4249

4350
private class RelevantNode extends Node {
@@ -217,4 +224,12 @@ module Consistency {
217224
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
218225
msg = "PostUpdateNode should not be the target of local flow."
219226
}
227+
228+
query predicate viableImplInCallContextTooLarge(
229+
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
230+
) {
231+
callable = viableImplInCallContext(call, ctx) and
232+
not callable = viableCallable(call) and
233+
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
234+
}
220235
}

python/ql/test/experimental/dataflow/basic/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/calls/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/consistency/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/coverage/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/fieldflow/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/global-flow/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/match/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/pep_328/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/regression/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/strange-essaflow/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/tainttracking/basic/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/tainttracking/commonSanitizer/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/tainttracking/customSanitizer/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/tainttracking/defaultAdditionalTaintStep-py3/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/tainttracking/defaultAdditionalTaintStep/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/tainttracking/unwanted-global-flow/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/typetracking/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/experimental/dataflow/variable-capture/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/library-tests/ApiGraphs/py3/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

python/ql/test/library-tests/frameworks/django-orm/dataflow-consistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ postIsInSameCallable
1616
reverseRead
1717
argHasPostUpdate
1818
postWithInFlow
19+
viableImplInCallContextTooLarge

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ private module Cached {
709709
*/
710710
pragma[nomagic]
711711
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
712-
result = viableImplInCallContext(call, ctx)
712+
result = viableImplInCallContext(call, ctx) and
713+
result = viableCallable(call)
713714
or
714715
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
715716
or

0 commit comments

Comments
 (0)