Commit 9688ab26b921e372cc296d4d1b0d48cbcf6a96c5

Brent Cook 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>