|
9688ab26
|
2014-12-13T08:55:59
|
|
Avoid left shift overflow in reallocarray
Some 64-bit platforms (e.g. Windows 64) have a 32-bit long. So, shifting
1UL 32-bits to the left causes an overflow. This replaces the constant
1UL with (size_t)1 so that we get the correct constant size for the
platform.
Import from OpenBSD.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|