Skip to content

Commit e13b3ed

Browse files
committed
C++ and Swift: Fix merge conflicts.
1 parent e29ce5f commit e13b3ed

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,14 +1969,13 @@ private module Cached {
19691969
cached
19701970
predicate localFlowStep(Node nodeFrom, Node nodeTo) {
19711971
// common dataflow steps
1972-
simpleLocalFlowStep(nodeFrom, nodeTo)
1972+
simpleLocalFlowStep(nodeFrom, nodeTo, _)
19731973
or
19741974
// models-as-data summarized flow for local data flow (i.e. special case for flow
19751975
// through calls to modeled functions, without relying on global dataflow to join
19761976
// the dots).
19771977
FlowSummaryImpl::Private::Steps::summaryThroughStepValue(nodeFrom, nodeTo, _)
19781978
}
1979-
predicate localFlowStep(Node nodeFrom, Node nodeTo) { simpleLocalFlowStep(nodeFrom, nodeTo, _) }
19801979

19811980
private predicate indirectionOperandFlow(RawIndirectOperand nodeFrom, Node nodeTo) {
19821981
nodeFrom != nodeTo and
@@ -2084,13 +2083,12 @@ private module Cached {
20842083
// Reverse flow: data that flows from the definition node back into the indirection returned
20852084
// by a function. This allows data to flow 'in' through references returned by a modeled
20862085
// function such as `operator[]`.
2087-
reverseFlow(nodeFrom, nodeTo)
2086+
reverseFlow(nodeFrom, nodeTo) and
2087+
model = ""
20882088
or
20892089
// models-as-data summarized flow
20902090
FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom.(FlowSummaryNode).getSummaryNode(),
2091-
nodeTo.(FlowSummaryNode).getSummaryNode(), true)
2092-
reverseFlow(nodeFrom, nodeTo) and
2093-
model = ""
2091+
nodeTo.(FlowSummaryNode).getSummaryNode(), true, model)
20942092
}
20952093

20962094
private predicate simpleInstructionLocalFlowStep(Operand opFrom, Instruction iTo) {

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ predicate localTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
2020
DataFlow::localFlowStep(nodeFrom, nodeTo)
2121
or
2222
// taint flow step
23-
localAdditionalTaintStep(nodeFrom, nodeTo)
23+
localAdditionalTaintStep(nodeFrom, nodeTo, _)
2424
or
2525
// models-as-data summarized flow for local data flow (i.e. special case for flow
2626
// through calls to modeled functions, without relying on global dataflow to join
2727
// the dots).
2828
FlowSummaryImpl::Private::Steps::summaryThroughStepTaint(nodeFrom, nodeTo, _)
29-
localAdditionalTaintStep(nodeFrom, nodeTo, _)
3029
}
3130

3231
/**
@@ -55,7 +54,7 @@ predicate localAdditionalTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeT
5554
or
5655
// models-as-data summarized flow
5756
FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom.(FlowSummaryNode).getSummaryNode(),
58-
nodeTo.(FlowSummaryNode).getSummaryNode(), false)
57+
nodeTo.(FlowSummaryNode).getSummaryNode(), false, model)
5958
or
6059
// object->field conflation for content that is a `TaintInheritingContent`.
6160
exists(DataFlow::ContentSet f |

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,9 @@ private module Cached {
323323
/** This is the local flow predicate that is exposed. */
324324
cached
325325
predicate localFlowStepImpl(Node nodeFrom, Node nodeTo) {
326-
localFlowStepCommon(nodeFrom, nodeTo)
326+
localFlowStepCommon(nodeFrom, nodeTo, _)
327327
or
328328
// models-as-data summarized flow
329-
localFlowStepCommon(nodeFrom, nodeTo, _) or
330329
FlowSummaryImpl::Private::Steps::summaryThroughStepValue(nodeFrom, nodeTo, _)
331330
}
332331

0 commit comments

Comments
 (0)