@@ -76,7 +76,7 @@ abstract class BufferWrite extends Expr {
76
76
* can be found), specifying the reason for the estimation.
77
77
*/
78
78
int getMaxData ( BufferWriteEstimationReason reason ) {
79
- reason instanceof NoSpecifiedEstimateReason and result = getMaxData ( )
79
+ reason instanceof NoSpecifiedEstimateReason and result = this . getMaxData ( )
80
80
}
81
81
82
82
/**
@@ -85,7 +85,7 @@ abstract class BufferWrite extends Expr {
85
85
* much smaller (8 bytes) than their true maximum length. This can be
86
86
* helpful in determining the cause of a buffer overflow issue.
87
87
*/
88
- int getMaxDataLimited ( ) { result = getMaxData ( ) }
88
+ int getMaxDataLimited ( ) { result = this . getMaxData ( ) }
89
89
90
90
/**
91
91
* Gets an upper bound to the amount of data that's being written (if one
@@ -94,7 +94,7 @@ abstract class BufferWrite extends Expr {
94
94
* than their true maximum length. This can be helpful in determining the
95
95
* cause of a buffer overflow issue.
96
96
*/
97
- int getMaxDataLimited ( BufferWriteEstimationReason reason ) { result = getMaxData ( reason ) }
97
+ int getMaxDataLimited ( BufferWriteEstimationReason reason ) { result = this . getMaxData ( reason ) }
98
98
99
99
/**
100
100
* Gets the size of a single character of the type this
@@ -159,9 +159,11 @@ class StrCopyBW extends BufferWriteCall {
159
159
this .getArgument ( this .getParamSrc ( ) ) .( AnalysedString ) .getMaxLength ( ) * this .getCharSize ( )
160
160
}
161
161
162
- override int getMaxData ( BufferWriteEstimationReason reason ) { result = getMaxDataImpl ( reason ) }
162
+ override int getMaxData ( BufferWriteEstimationReason reason ) {
163
+ result = this .getMaxDataImpl ( reason )
164
+ }
163
165
164
- override int getMaxData ( ) { result = max ( getMaxDataImpl ( _) ) }
166
+ override int getMaxData ( ) { result = max ( this . getMaxDataImpl ( _) ) }
165
167
}
166
168
167
169
/**
@@ -203,9 +205,11 @@ class StrCatBW extends BufferWriteCall {
203
205
this .getArgument ( this .getParamSrc ( ) ) .( AnalysedString ) .getMaxLength ( ) * this .getCharSize ( )
204
206
}
205
207
206
- override int getMaxData ( BufferWriteEstimationReason reason ) { result = getMaxDataImpl ( reason ) }
208
+ override int getMaxData ( BufferWriteEstimationReason reason ) {
209
+ result = this .getMaxDataImpl ( reason )
210
+ }
207
211
208
- override int getMaxData ( ) { result = max ( getMaxDataImpl ( _) ) }
212
+ override int getMaxData ( ) { result = max ( this . getMaxDataImpl ( _) ) }
209
213
}
210
214
211
215
/**
@@ -269,9 +273,11 @@ class SprintfBW extends BufferWriteCall {
269
273
)
270
274
}
271
275
272
- override int getMaxData ( BufferWriteEstimationReason reason ) { result = getMaxDataImpl ( reason ) }
276
+ override int getMaxData ( BufferWriteEstimationReason reason ) {
277
+ result = this .getMaxDataImpl ( reason )
278
+ }
273
279
274
- override int getMaxData ( ) { result = max ( getMaxDataImpl ( _) ) }
280
+ override int getMaxData ( ) { result = max ( this . getMaxDataImpl ( _) ) }
275
281
276
282
private int getMaxDataLimitedImpl ( BufferWriteEstimationReason reason ) {
277
283
exists ( FormatLiteral fl |
@@ -281,10 +287,10 @@ class SprintfBW extends BufferWriteCall {
281
287
}
282
288
283
289
override int getMaxDataLimited ( BufferWriteEstimationReason reason ) {
284
- result = getMaxDataLimitedImpl ( reason )
290
+ result = this . getMaxDataLimitedImpl ( reason )
285
291
}
286
292
287
- override int getMaxDataLimited ( ) { result = max ( getMaxDataLimitedImpl ( _) ) }
293
+ override int getMaxDataLimited ( ) { result = max ( this . getMaxDataLimitedImpl ( _) ) }
288
294
}
289
295
290
296
/**
@@ -382,9 +388,11 @@ class SnprintfBW extends BufferWriteCall {
382
388
)
383
389
}
384
390
385
- override int getMaxData ( BufferWriteEstimationReason reason ) { result = getMaxDataImpl ( reason ) }
391
+ override int getMaxData ( BufferWriteEstimationReason reason ) {
392
+ result = this .getMaxDataImpl ( reason )
393
+ }
386
394
387
- override int getMaxData ( ) { result = max ( getMaxDataImpl ( _) ) }
395
+ override int getMaxData ( ) { result = max ( this . getMaxDataImpl ( _) ) }
388
396
389
397
private int getMaxDataLimitedImpl ( BufferWriteEstimationReason reason ) {
390
398
exists ( FormatLiteral fl |
@@ -394,10 +402,10 @@ class SnprintfBW extends BufferWriteCall {
394
402
}
395
403
396
404
override int getMaxDataLimited ( BufferWriteEstimationReason reason ) {
397
- result = getMaxDataLimitedImpl ( reason )
405
+ result = this . getMaxDataLimitedImpl ( reason )
398
406
}
399
407
400
- override int getMaxDataLimited ( ) { result = max ( getMaxDataLimitedImpl ( _) ) }
408
+ override int getMaxDataLimited ( ) { result = max ( this . getMaxDataLimitedImpl ( _) ) }
401
409
}
402
410
403
411
/**
@@ -495,9 +503,11 @@ class ScanfBW extends BufferWrite {
495
503
)
496
504
}
497
505
498
- override int getMaxData ( BufferWriteEstimationReason reason ) { result = getMaxDataImpl ( reason ) }
506
+ override int getMaxData ( BufferWriteEstimationReason reason ) {
507
+ result = this .getMaxDataImpl ( reason )
508
+ }
499
509
500
- override int getMaxData ( ) { result = max ( getMaxDataImpl ( _) ) }
510
+ override int getMaxData ( ) { result = max ( this . getMaxDataImpl ( _) ) }
501
511
502
512
override string getBWDesc ( ) {
503
513
exists ( FunctionCall fc |
@@ -536,7 +546,9 @@ class RealpathBW extends BufferWriteCall {
536
546
this = this // Suppress a compiler warning
537
547
}
538
548
539
- override int getMaxData ( BufferWriteEstimationReason reason ) { result = getMaxDataImpl ( reason ) }
549
+ override int getMaxData ( BufferWriteEstimationReason reason ) {
550
+ result = this .getMaxDataImpl ( reason )
551
+ }
540
552
541
- override int getMaxData ( ) { result = max ( getMaxDataImpl ( _) ) }
553
+ override int getMaxData ( ) { result = max ( this . getMaxDataImpl ( _) ) }
542
554
}
0 commit comments