Skip to content

Commit e379e31

Browse files
committed
Data flow: Sync files
1 parent a2cc202 commit e379e31

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
@@ -182,6 +182,7 @@ private module LambdaFlow {
182182
boolean toJump, DataFlowCallOption lastCall
183183
) {
184184
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
185+
not expectsContent(node, _) and
185186
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
186187
then compatibleTypes(t, getNodeDataFlowType(node))
187188
else any()

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

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ private module LambdaFlow {
182182
boolean toJump, DataFlowCallOption lastCall
183183
) {
184184
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
185+
not expectsContent(node, _) and
185186
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
186187
then compatibleTypes(t, getNodeDataFlowType(node))
187188
else any()

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

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ private module LambdaFlow {
182182
boolean toJump, DataFlowCallOption lastCall
183183
) {
184184
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
185+
not expectsContent(node, _) and
185186
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
186187
then compatibleTypes(t, getNodeDataFlowType(node))
187188
else any()

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

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ private module LambdaFlow {
182182
boolean toJump, DataFlowCallOption lastCall
183183
) {
184184
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
185+
not expectsContent(node, _) and
185186
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
186187
then compatibleTypes(t, getNodeDataFlowType(node))
187188
else any()

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

+3
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ module Private {
439439
out.head() = TParameterSummaryComponent(_) and
440440
s = out.tail()
441441
)
442+
or
443+
// Add the post-update node corresponding to the requested argument node
444+
outputState(c, s) and isCallbackParameter(s)
442445
}
443446

444447
private newtype TSummaryNodeState =

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

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ private module LambdaFlow {
182182
boolean toJump, DataFlowCallOption lastCall
183183
) {
184184
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
185+
not expectsContent(node, _) and
185186
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
186187
then compatibleTypes(t, getNodeDataFlowType(node))
187188
else any()

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

+3
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ module Private {
439439
out.head() = TParameterSummaryComponent(_) and
440440
s = out.tail()
441441
)
442+
or
443+
// Add the post-update node corresponding to the requested argument node
444+
outputState(c, s) and isCallbackParameter(s)
442445
}
443446

444447
private newtype TSummaryNodeState =

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

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ private module LambdaFlow {
182182
boolean toJump, DataFlowCallOption lastCall
183183
) {
184184
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
185+
not expectsContent(node, _) and
185186
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
186187
then compatibleTypes(t, getNodeDataFlowType(node))
187188
else any()

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

+3
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ module Private {
439439
out.head() = TParameterSummaryComponent(_) and
440440
s = out.tail()
441441
)
442+
or
443+
// Add the post-update node corresponding to the requested argument node
444+
outputState(c, s) and isCallbackParameter(s)
442445
}
443446

444447
private newtype TSummaryNodeState =

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

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ private module LambdaFlow {
182182
boolean toJump, DataFlowCallOption lastCall
183183
) {
184184
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
185+
not expectsContent(node, _) and
185186
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
186187
then compatibleTypes(t, getNodeDataFlowType(node))
187188
else any()

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

+3
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ module Private {
439439
out.head() = TParameterSummaryComponent(_) and
440440
s = out.tail()
441441
)
442+
or
443+
// Add the post-update node corresponding to the requested argument node
444+
outputState(c, s) and isCallbackParameter(s)
442445
}
443446

444447
private newtype TSummaryNodeState =

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

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ private module LambdaFlow {
182182
boolean toJump, DataFlowCallOption lastCall
183183
) {
184184
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
185+
not expectsContent(node, _) and
185186
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
186187
then compatibleTypes(t, getNodeDataFlowType(node))
187188
else any()

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

+3
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ module Private {
439439
out.head() = TParameterSummaryComponent(_) and
440440
s = out.tail()
441441
)
442+
or
443+
// Add the post-update node corresponding to the requested argument node
444+
outputState(c, s) and isCallbackParameter(s)
442445
}
443446

444447
private newtype TSummaryNodeState =

0 commit comments

Comments
 (0)