diff options
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -35,9 +35,9 @@ size_t array_mult_safe (const size_t m1, const size_t m2) { - const unsigned long long limit = 0xFFFFFFFF; + const size_t limit = 0xFFFFFFFF; unsigned long long res = (unsigned long long)m1 * (unsigned long long)m2; - if (unlikely(m1 > limit) || unlikely(m2 > limit) || unlikely(res > limit)) + if (unlikely(m1 > limit) || unlikely(m2 > limit) || unlikely(res > (unsigned long long)limit)) msg (M_FATAL, "attemped allocation of excessively large array"); return (size_t) res; } |