Skip to content

Commit 27e0034

Browse files
committed
Data flow: Sync files
1 parent 8fe94a5 commit 27e0034

File tree

13 files changed

+23
-0
lines changed

13 files changed

+23
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ private module LambdaFlow {
179179
boolean toJump, DataFlowCallOption lastCall
180180
) {
181181
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
182+
not expectsContent(node, _) and
182183
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
183184
then compatibleTypes(t, getNodeDataFlowType(node))
184185
else any()

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

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ private module LambdaFlow {
179179
boolean toJump, DataFlowCallOption lastCall
180180
) {
181181
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
182+
not expectsContent(node, _) and
182183
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
183184
then compatibleTypes(t, getNodeDataFlowType(node))
184185
else any()

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

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ private module LambdaFlow {
179179
boolean toJump, DataFlowCallOption lastCall
180180
) {
181181
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
182+
not expectsContent(node, _) and
182183
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
183184
then compatibleTypes(t, getNodeDataFlowType(node))
184185
else any()

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

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ private module LambdaFlow {
179179
boolean toJump, DataFlowCallOption lastCall
180180
) {
181181
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
182+
not expectsContent(node, _) and
182183
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
183184
then compatibleTypes(t, getNodeDataFlowType(node))
184185
else any()

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

+3
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ module Private {
418418
out.head() = TParameterSummaryComponent(_) and
419419
s = out.tail()
420420
)
421+
or
422+
// Add the post-update node corresponding to the requested argument node
423+
outputState(c, s) and isCallbackParameter(s)
421424
}
422425

423426
private newtype TSummaryNodeState =

go/ql/lib/semmle/go/dataflow/internal/DataFlowImplCommon.qll

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ private module LambdaFlow {
179179
boolean toJump, DataFlowCallOption lastCall
180180
) {
181181
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
182+
not expectsContent(node, _) and
182183
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
183184
then compatibleTypes(t, getNodeDataFlowType(node))
184185
else any()

go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll

+3
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ module Private {
418418
out.head() = TParameterSummaryComponent(_) and
419419
s = out.tail()
420420
)
421+
or
422+
// Add the post-update node corresponding to the requested argument node
423+
outputState(c, s) and isCallbackParameter(s)
421424
}
422425

423426
private newtype TSummaryNodeState =

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

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ private module LambdaFlow {
179179
boolean toJump, DataFlowCallOption lastCall
180180
) {
181181
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
182+
not expectsContent(node, _) and
182183
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
183184
then compatibleTypes(t, getNodeDataFlowType(node))
184185
else any()

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

+3
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ module Private {
418418
out.head() = TParameterSummaryComponent(_) and
419419
s = out.tail()
420420
)
421+
or
422+
// Add the post-update node corresponding to the requested argument node
423+
outputState(c, s) and isCallbackParameter(s)
421424
}
422425

423426
private newtype TSummaryNodeState =

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

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ private module LambdaFlow {
179179
boolean toJump, DataFlowCallOption lastCall
180180
) {
181181
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
182+
not expectsContent(node, _) and
182183
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
183184
then compatibleTypes(t, getNodeDataFlowType(node))
184185
else any()

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

+3
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ module Private {
418418
out.head() = TParameterSummaryComponent(_) and
419419
s = out.tail()
420420
)
421+
or
422+
// Add the post-update node corresponding to the requested argument node
423+
outputState(c, s) and isCallbackParameter(s)
421424
}
422425

423426
private newtype TSummaryNodeState =

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

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ private module LambdaFlow {
179179
boolean toJump, DataFlowCallOption lastCall
180180
) {
181181
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
182+
not expectsContent(node, _) and
182183
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
183184
then compatibleTypes(t, getNodeDataFlowType(node))
184185
else any()

swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll

+3
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ module Private {
418418
out.head() = TParameterSummaryComponent(_) and
419419
s = out.tail()
420420
)
421+
or
422+
// Add the post-update node corresponding to the requested argument node
423+
outputState(c, s) and isCallbackParameter(s)
421424
}
422425

423426
private newtype TSummaryNodeState =

0 commit comments

Comments
 (0)