-
The previous implementation could potentially pass a negative value to realloc, causing it to underflow the size_t argument - leading to a far too big allocation. These changes circumvents the problem by first checking so that we have at least N > 0 elements to allocate memory for. Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
45ea4a7d