Suffix BUFFERSIZEs as UL to prevent int overflow in computations

This commit is contained in:
Martin Kroeker 2024-07-11 20:13:57 +02:00 committed by GitHub
parent b70227ad62
commit 475bd2452b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 5 deletions

View File

@ -841,17 +841,17 @@ Lmcount$lazy_ptr:
#endif
#if defined(PPC440)
#define BUFFER_SIZE ( 2 << 20)
#define BUFFER_SIZE ( 2UL << 20)
#elif defined(PPC440FP2)
#define BUFFER_SIZE ( 16 << 20)
#define BUFFER_SIZE ( 16UL << 20)
#elif defined(POWER6) || defined(POWER8) || defined(POWER9) || defined(POWER10)
#define BUFFER_SIZE ( 64 << 22)
#define BUFFER_SIZE ( 64UL << 22)
#else
#define BUFFER_SIZE ( 16 << 20)
#define BUFFER_SIZE ( 16UL << 20)
#endif
#ifdef DYNAMIC_ARCH
#undef BUFFER_SIZE
#define BUFFER_SIZE (64 << 22)
#define BUFFER_SIZE (64UL << 22)
#endif
#ifndef PAGESIZE