Skip to content

Commit 72415c7

Browse files
committed
C++: Rename references.
1 parent ec34d44 commit 72415c7

File tree

48 files changed

+117
-117
lines changed

Some content is hidden

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

48 files changed

+117
-117
lines changed

cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module PrivateCleartextWrite {
5454
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
5555
}
5656

57-
module WriteFlow = TaintTracking::Make<WriteConfig>;
57+
module WriteFlow = TaintTracking::Global<WriteConfig>;
5858

5959
class PrivateDataSource extends Source {
6060
PrivateDataSource() { this.getExpr() instanceof PrivateDataExpr }

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private module DefaultTaintTrackingConfig implements DataFlow::ConfigSig {
103103
}
104104
}
105105

106-
private module DefaultTaintTrackingFlow = TaintTracking::Make<DefaultTaintTrackingConfig>;
106+
private module DefaultTaintTrackingFlow = TaintTracking::Global<DefaultTaintTrackingConfig>;
107107

108108
private module ToGlobalVarTaintTrackingConfig implements DataFlow::ConfigSig {
109109
predicate isSource(DataFlow::Node source) { source = getNodeForSource(_) }
@@ -121,13 +121,13 @@ private module ToGlobalVarTaintTrackingConfig implements DataFlow::ConfigSig {
121121
predicate isBarrierIn(DataFlow::Node node) { nodeIsBarrierIn(node) }
122122
}
123123

124-
private module ToGlobalVarTaintTrackingFlow = TaintTracking::Make<ToGlobalVarTaintTrackingConfig>;
124+
private module ToGlobalVarTaintTrackingFlow = TaintTracking::Global<ToGlobalVarTaintTrackingConfig>;
125125

126126
private module FromGlobalVarTaintTrackingConfig implements DataFlow::ConfigSig {
127127
predicate isSource(DataFlow::Node source) {
128128
// This set of sources should be reasonably small, which is good for
129129
// performance since the set of sinks is very large.
130-
ToGlobalVarTaintTrackingFlow::hasFlowTo(source)
130+
ToGlobalVarTaintTrackingFlow::flowTo(source)
131131
}
132132

133133
predicate isSink(DataFlow::Node sink) { exists(adjustedSink(sink)) }
@@ -145,7 +145,7 @@ private module FromGlobalVarTaintTrackingConfig implements DataFlow::ConfigSig {
145145
}
146146

147147
private module FromGlobalVarTaintTrackingFlow =
148-
TaintTracking::Make<FromGlobalVarTaintTrackingConfig>;
148+
TaintTracking::Global<FromGlobalVarTaintTrackingConfig>;
149149

150150
private predicate readsVariable(LoadInstruction load, Variable var) {
151151
load.getSourceAddress().(VariableAddressInstruction).getAstVariable() = var
@@ -331,7 +331,7 @@ private import Cached
331331
cached
332332
predicate tainted(Expr source, Element tainted) {
333333
exists(DataFlow::Node sink |
334-
DefaultTaintTrackingFlow::hasFlow(getNodeForSource(source), sink) and
334+
DefaultTaintTrackingFlow::flow(getNodeForSource(source), sink) and
335335
tainted = adjustedSink(sink)
336336
)
337337
}
@@ -360,8 +360,8 @@ predicate taintedIncludingGlobalVars(Expr source, Element tainted, string global
360360
DataFlow::VariableNode variableNode, GlobalOrNamespaceVariable global, DataFlow::Node sink
361361
|
362362
global = variableNode.getVariable() and
363-
ToGlobalVarTaintTrackingFlow::hasFlow(getNodeForSource(source), variableNode) and
364-
FromGlobalVarTaintTrackingFlow::hasFlow(variableNode, sink) and
363+
ToGlobalVarTaintTrackingFlow::flow(getNodeForSource(source), variableNode) and
364+
FromGlobalVarTaintTrackingFlow::flow(variableNode, sink) and
365365
tainted = adjustedSink(sink) and
366366
global = globalVarFromId(globalVar)
367367
)
@@ -450,7 +450,7 @@ module TaintedWithPath {
450450
predicate isBarrierIn(DataFlow::Node node) { nodeIsBarrierIn(node) }
451451
}
452452

453-
private module AdjustedFlow = TaintTracking::Make<AdjustedConfig>;
453+
private module AdjustedFlow = TaintTracking::Global<AdjustedConfig>;
454454

455455
/*
456456
* A sink `Element` may map to multiple `DataFlowX::PathNode`s via (the
@@ -472,7 +472,7 @@ module TaintedWithPath {
472472
// that makes it easiest to deal with the case where source = sink.
473473
TEndpointPathNode(Element e) {
474474
exists(DataFlow::Node sourceNode, DataFlow::Node sinkNode |
475-
AdjustedFlow::hasFlow(sourceNode, sinkNode)
475+
AdjustedFlow::flow(sourceNode, sinkNode)
476476
|
477477
sourceNode = getNodeForExpr(e) and
478478
exists(TaintTrackingConfiguration ttCfg | ttCfg.isSource(e))
@@ -634,7 +634,7 @@ module TaintedWithPath {
634634
exists(DataFlow::Node flowSource, DataFlow::Node flowSink |
635635
source = sourceNode.(InitialPathNode).inner() and
636636
flowSource = getNodeForExpr(source) and
637-
AdjustedFlow::hasFlow(flowSource, flowSink) and
637+
AdjustedFlow::flow(flowSource, flowSink) and
638638
tainted = adjustedSink(flowSink) and
639639
tainted = sinkNode.(FinalPathNode).inner()
640640
)

cpp/ql/lib/semmle/code/cpp/security/boostorg/asio/protocols.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ module BoostorgAsio {
399399
import Config
400400
}
401401

402-
import DataFlow::Make<C>
402+
import DataFlow::Global<C>
403403
}
404404

405405
/**
@@ -596,7 +596,7 @@ module BoostorgAsio {
596596
}
597597
}
598598

599-
module SslContextFlowsToSetOptionFlow = DataFlow::Make<SslContextFlowsToSetOptionConfig>;
599+
module SslContextFlowsToSetOptionFlow = DataFlow::Global<SslContextFlowsToSetOptionConfig>;
600600

601601
/**
602602
* An option value that flows to the first parameter of a call to `SetOptions()`.
@@ -640,5 +640,5 @@ module BoostorgAsio {
640640
}
641641
}
642642

643-
module SslOptionFlow = DataFlow::Make<SslOptionConfig>;
643+
module SslOptionFlow = DataFlow::Global<SslOptionConfig>;
644644
}

cpp/ql/src/Critical/OverflowDestination.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ module OverflowDestinationConfig implements DataFlow::ConfigSig {
8484
}
8585
}
8686

87-
module OverflowDestination = TaintTracking::Make<OverflowDestinationConfig>;
87+
module OverflowDestination = TaintTracking::Global<OverflowDestinationConfig>;
8888

8989
from FunctionCall fc, OverflowDestination::PathNode source, OverflowDestination::PathNode sink
9090
where
91-
OverflowDestination::hasFlowPath(source, sink) and
91+
OverflowDestination::flowPath(source, sink) and
9292
sourceSized(fc, sink.getNode().asIndirectConvertedExpr())
9393
select fc, source, sink,
9494
"To avoid overflow, this operation should be bounded by destination-buffer size, not source-buffer size."

cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ predicate introducesNewField(Class derived, Class base) {
8080
)
8181
}
8282

83-
module CastToPointerArithFlow = DataFlow::MakeWithState<CastToPointerArithFlowConfig>;
83+
module CastToPointerArithFlow = DataFlow::GlobalWithState<CastToPointerArithFlowConfig>;
8484

8585
from CastToPointerArithFlow::PathNode source, CastToPointerArithFlow::PathNode sink
86-
where CastToPointerArithFlow::hasFlowPath(source, sink)
86+
where CastToPointerArithFlow::flowPath(source, sink)
8787
select sink, source, sink, "This pointer arithmetic may be done with the wrong type because of $@.",
8888
source, "this cast"

cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ module NonConstFlowConfig implements DataFlow::ConfigSig {
146146
predicate isBarrier(DataFlow::Node node) { isBarrierNode(node) }
147147
}
148148

149-
module NonConstFlow = TaintTracking::Make<NonConstFlowConfig>;
149+
module NonConstFlow = TaintTracking::Global<NonConstFlowConfig>;
150150

151151
from FormattingFunctionCall call, Expr formatString
152152
where
153153
call.getArgument(call.getFormatParameterIndex()) = formatString and
154154
exists(DataFlow::Node sink |
155-
NonConstFlow::hasFlowTo(sink) and
155+
NonConstFlow::flowTo(sink) and
156156
isSinkImpl(sink, formatString)
157157
)
158158
select formatString,

cpp/ql/src/Likely Bugs/Leap Year/Adding365DaysPerYear.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import LeapYear
1616

1717
from Expr source, Expr sink
1818
where
19-
PossibleYearArithmeticOperationCheckFlow::hasFlow(DataFlow::exprNode(source),
19+
PossibleYearArithmeticOperationCheckFlow::flow(DataFlow::exprNode(source),
2020
DataFlow::exprNode(sink))
2121
select sink,
2222
"An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios.",

cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ private module LeapYearCheckConfig implements DataFlow::ConfigSig {
231231
}
232232
}
233233

234-
module LeapYearCheckFlow = DataFlow::Make<LeapYearCheckConfig>;
234+
module LeapYearCheckFlow = DataFlow::Global<LeapYearCheckConfig>;
235235

236236
/**
237237
* Data flow configuration for finding an operation with hardcoded 365 that will flow into
@@ -284,7 +284,7 @@ private module FiletimeYearArithmeticOperationCheckConfig implements DataFlow::C
284284
}
285285

286286
module FiletimeYearArithmeticOperationCheckFlow =
287-
DataFlow::Make<FiletimeYearArithmeticOperationCheckConfig>;
287+
DataFlow::Global<FiletimeYearArithmeticOperationCheckConfig>;
288288

289289
/**
290290
* Taint configuration for finding an operation with hardcoded 365 that will flow into any known date/time field.
@@ -372,4 +372,4 @@ private module PossibleYearArithmeticOperationCheckConfig implements DataFlow::C
372372
}
373373

374374
module PossibleYearArithmeticOperationCheckFlow =
375-
TaintTracking::Make<PossibleYearArithmeticOperationCheckConfig>;
375+
TaintTracking::Global<PossibleYearArithmeticOperationCheckConfig>;

cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ where
3131
// If there is a data flow from the variable that was modified to a function that seems to check for leap year
3232
exists(VariableAccess source, ChecksForLeapYearFunctionCall fc |
3333
source = var.getAnAccess() and
34-
LeapYearCheckFlow::hasFlow(DataFlow::exprNode(source),
34+
LeapYearCheckFlow::flow(DataFlow::exprNode(source),
3535
DataFlow::exprNode(fc.getAnArgument()))
3636
)
3737
or
3838
// If there is a data flow from the field that was modified to a function that seems to check for leap year
3939
exists(VariableAccess vacheck, YearFieldAccess yfacheck, ChecksForLeapYearFunctionCall fc |
4040
vacheck = var.getAnAccess() and
4141
yfacheck.getQualifier() = vacheck and
42-
LeapYearCheckFlow::hasFlow(DataFlow::exprNode(yfacheck),
42+
LeapYearCheckFlow::flow(DataFlow::exprNode(yfacheck),
4343
DataFlow::exprNode(fc.getAnArgument()))
4444
)
4545
or

cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ import cpp
1212
import NtohlArrayNoBound
1313

1414
from DataFlow::Node source, DataFlow::Node sink
15-
where NetworkToBufferSizeFlow::hasFlow(source, sink)
15+
where NetworkToBufferSizeFlow::flow(source, sink)
1616
select sink, "Unchecked use of data from network function $@.", source, source.toString()

0 commit comments

Comments
 (0)