@@ -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 UnspecifiedEstimateReason and result = getMaxData ( )
79+ reason instanceof UnspecifiedEstimateReason and result = this . getMaxData ( )
8080 }
8181
8282 /**
@@ -85,7 +85,7 @@ abstract class BufferWrite extends Expr {
8585 * much smaller (8 bytes) than their true maximum length. This can be
8686 * helpful in determining the cause of a buffer overflow issue.
8787 */
88- int getMaxDataLimited ( ) { result = getMaxData ( ) }
88+ int getMaxDataLimited ( ) { result = this . getMaxData ( ) }
8989
9090 /**
9191 * Gets an upper bound to the amount of data that's being written (if one
@@ -94,7 +94,7 @@ abstract class BufferWrite extends Expr {
9494 * than their true maximum length. This can be helpful in determining the
9595 * cause of a buffer overflow issue.
9696 */
97- int getMaxDataLimited ( BufferWriteEstimationReason reason ) { result = getMaxData ( reason ) }
97+ int getMaxDataLimited ( BufferWriteEstimationReason reason ) { result = this . getMaxData ( reason ) }
9898
9999 /**
100100 * Gets the size of a single character of the type this
@@ -159,9 +159,11 @@ class StrCopyBW extends BufferWriteCall {
159159 this .getArgument ( this .getParamSrc ( ) ) .( AnalysedString ) .getMaxLength ( ) * this .getCharSize ( )
160160 }
161161
162- override int getMaxData ( BufferWriteEstimationReason reason ) { result = getMaxDataImpl ( reason ) }
162+ override int getMaxData ( BufferWriteEstimationReason reason ) {
163+ result = this .getMaxDataImpl ( reason )
164+ }
163165
164- override int getMaxData ( ) { result = max ( getMaxDataImpl ( _) ) }
166+ override int getMaxData ( ) { result = max ( this . getMaxDataImpl ( _) ) }
165167}
166168
167169/**
@@ -203,9 +205,11 @@ class StrCatBW extends BufferWriteCall {
203205 this .getArgument ( this .getParamSrc ( ) ) .( AnalysedString ) .getMaxLength ( ) * this .getCharSize ( )
204206 }
205207
206- override int getMaxData ( BufferWriteEstimationReason reason ) { result = getMaxDataImpl ( reason ) }
208+ override int getMaxData ( BufferWriteEstimationReason reason ) {
209+ result = this .getMaxDataImpl ( reason )
210+ }
207211
208- override int getMaxData ( ) { result = max ( getMaxDataImpl ( _) ) }
212+ override int getMaxData ( ) { result = max ( this . getMaxDataImpl ( _) ) }
209213}
210214
211215/**
@@ -269,9 +273,11 @@ class SprintfBW extends BufferWriteCall {
269273 )
270274 }
271275
272- override int getMaxData ( BufferWriteEstimationReason reason ) { result = getMaxDataImpl ( reason ) }
276+ override int getMaxData ( BufferWriteEstimationReason reason ) {
277+ result = this .getMaxDataImpl ( reason )
278+ }
273279
274- override int getMaxData ( ) { result = max ( getMaxDataImpl ( _) ) }
280+ override int getMaxData ( ) { result = max ( this . getMaxDataImpl ( _) ) }
275281
276282 private int getMaxDataLimitedImpl ( BufferWriteEstimationReason reason ) {
277283 exists ( FormatLiteral fl |
@@ -281,10 +287,10 @@ class SprintfBW extends BufferWriteCall {
281287 }
282288
283289 override int getMaxDataLimited ( BufferWriteEstimationReason reason ) {
284- result = getMaxDataLimitedImpl ( reason )
290+ result = this . getMaxDataLimitedImpl ( reason )
285291 }
286292
287- override int getMaxDataLimited ( ) { result = max ( getMaxDataLimitedImpl ( _) ) }
293+ override int getMaxDataLimited ( ) { result = max ( this . getMaxDataLimitedImpl ( _) ) }
288294}
289295
290296/**
@@ -382,9 +388,11 @@ class SnprintfBW extends BufferWriteCall {
382388 )
383389 }
384390
385- override int getMaxData ( BufferWriteEstimationReason reason ) { result = getMaxDataImpl ( reason ) }
391+ override int getMaxData ( BufferWriteEstimationReason reason ) {
392+ result = this .getMaxDataImpl ( reason )
393+ }
386394
387- override int getMaxData ( ) { result = max ( getMaxDataImpl ( _) ) }
395+ override int getMaxData ( ) { result = max ( this . getMaxDataImpl ( _) ) }
388396
389397 private int getMaxDataLimitedImpl ( BufferWriteEstimationReason reason ) {
390398 exists ( FormatLiteral fl |
@@ -394,10 +402,10 @@ class SnprintfBW extends BufferWriteCall {
394402 }
395403
396404 override int getMaxDataLimited ( BufferWriteEstimationReason reason ) {
397- result = getMaxDataLimitedImpl ( reason )
405+ result = this . getMaxDataLimitedImpl ( reason )
398406 }
399407
400- override int getMaxDataLimited ( ) { result = max ( getMaxDataLimitedImpl ( _) ) }
408+ override int getMaxDataLimited ( ) { result = max ( this . getMaxDataLimitedImpl ( _) ) }
401409}
402410
403411/**
@@ -495,9 +503,11 @@ class ScanfBW extends BufferWrite {
495503 )
496504 }
497505
498- override int getMaxData ( BufferWriteEstimationReason reason ) { result = getMaxDataImpl ( reason ) }
506+ override int getMaxData ( BufferWriteEstimationReason reason ) {
507+ result = this .getMaxDataImpl ( reason )
508+ }
499509
500- override int getMaxData ( ) { result = max ( getMaxDataImpl ( _) ) }
510+ override int getMaxData ( ) { result = max ( this . getMaxDataImpl ( _) ) }
501511
502512 override string getBWDesc ( ) {
503513 exists ( FunctionCall fc |
@@ -536,7 +546,9 @@ class RealpathBW extends BufferWriteCall {
536546 this = this // Suppress a compiler warning
537547 }
538548
539- override int getMaxData ( BufferWriteEstimationReason reason ) { result = getMaxDataImpl ( reason ) }
549+ override int getMaxData ( BufferWriteEstimationReason reason ) {
550+ result = this .getMaxDataImpl ( reason )
551+ }
540552
541- override int getMaxData ( ) { result = max ( getMaxDataImpl ( _) ) }
553+ override int getMaxData ( ) { result = max ( this . getMaxDataImpl ( _) ) }
542554}
0 commit comments