Skip to content

Commit 8ac34f3

Browse files
authored
C++: NoSpecifiedEstimateReasonUnspecified...
1 parent 4a85b9b commit 8ac34f3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cpp/ql/lib/semmle/code/cpp/commons/Printf.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ private import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
1010
private import semmle.code.cpp.rangeanalysis.RangeAnalysisUtils
1111

1212
private newtype TBufferWriteEstimationReason =
13-
TNoSpecifiedEstimateReason() or
13+
TUnspecifiedEstimateReason() or
1414
TTypeBoundsAnalysis() or
1515
TValueFlowAnalysis()
1616

@@ -40,8 +40,8 @@ abstract class BufferWriteEstimationReason extends TBufferWriteEstimationReason
4040
* classes derived from BufferWrite and overriding `getMaxData/0` still work with the
4141
* queries as intended.
4242
*/
43-
class NoSpecifiedEstimateReason extends BufferWriteEstimationReason, TNoSpecifiedEstimateReason {
44-
override string toString() { result = "NoSpecifiedEstimateReason" }
43+
class UnspecifiedEstimateReason extends BufferWriteEstimationReason, TUnspecifiedEstimateReason {
44+
override string toString() { result = "UnspecifiedEstimateReason" }
4545

4646
override string getDescription() { result = "no reason specified" }
4747

@@ -62,7 +62,7 @@ class TypeBoundsAnalysis extends BufferWriteEstimationReason, TTypeBoundsAnalysi
6262
override string getDescription() { result = "based on type bounds" }
6363

6464
override BufferWriteEstimationReason combineWith(BufferWriteEstimationReason other) {
65-
other != TNoSpecifiedEstimateReason() and result = TTypeBoundsAnalysis()
65+
other != TUnspecifiedEstimateReason() and result = TTypeBoundsAnalysis()
6666
}
6767
}
6868

@@ -82,7 +82,7 @@ class ValueFlowAnalysis extends BufferWriteEstimationReason, TValueFlowAnalysis
8282
override string getDescription() { result = "based on flow analysis of value bounds" }
8383

8484
override BufferWriteEstimationReason combineWith(BufferWriteEstimationReason other) {
85-
other != TNoSpecifiedEstimateReason() and result = other
85+
other != TUnspecifiedEstimateReason() and result = other
8686
}
8787
}
8888

cpp/ql/lib/semmle/code/cpp/security/BufferWrite.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ abstract class BufferWrite extends Expr {
7676
* can be found), specifying the reason for the estimation.
7777
*/
7878
int getMaxData(BufferWriteEstimationReason reason) {
79-
reason instanceof NoSpecifiedEstimateReason and result = getMaxData()
79+
reason instanceof UnspecifiedEstimateReason and result = getMaxData()
8080
}
8181

8282
/**

0 commit comments

Comments
 (0)