mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 05:56:21 +00:00
Fix integer overflow (#435)
* Fix MAX_BUCKETS_MEM overflow * Fix MAX_QUERY_BUF overflow * Fix int overflow in IsBucketValid function * Add missing newline * Remove test for max value of pgsm_query_shared_buffer parameter * Tune tests * Cleanup * Use int64 type instead of long long
This commit is contained in:
@@ -1999,7 +1999,7 @@ IsBucketValid(uint64 bucketid)
|
||||
|
||||
TimestampDifference(pgsm->bucket_start_time[bucketid], current_tz, &secs, µsecs);
|
||||
|
||||
if (secs > (pgsm_bucket_time * pgsm_max_buckets))
|
||||
if (secs > ((int64)pgsm_bucket_time * pgsm_max_buckets))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user