Skip to content

Commit 12a43b6

Browse files
committed
C++: fix another use of AnalysedString
1 parent a86b5a1 commit 12a43b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class AnalyzedString extends Expr {
4444
* can be calculated.
4545
*/
4646
int getMaxLength() {
47-
// take the longest AnalysedString it's value could 'flow' from; however if even one doesn't
47+
// take the longest AnalyzedString its value could 'flow' from; however if even one doesn't
4848
// return a value (this essentially means 'infinity') we can't return a value either.
4949
result =
5050
max(AnalyzedString expr, int toMax |

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class StrCatBW extends BufferWriteCall {
201201
// when result exists, it is an exact flow analysis
202202
reason instanceof ValueFlowAnalysis and
203203
result =
204-
this.getArgument(this.getParamSrc()).(AnalysedString).getMaxLength() * this.getCharSize()
204+
this.getArgument(this.getParamSrc()).(AnalyzedString).getMaxLength() * this.getCharSize()
205205
}
206206

207207
override int getMaxData(BufferWriteEstimationReason reason) {

0 commit comments

Comments
 (0)