]> Savannah Git Hosting - gnulib.git/commit
safe-alloc: simplify via reallocarray
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 18 Apr 2021 23:53:11 +0000 (16:53 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 19 Apr 2021 03:59:52 +0000 (20:59 -0700)
commitd4e52e5e3c25942710cab4d5a3e78a761f1fa77c
tree050db37585fbd817b7b20a6b6968e9dd0d454eaa
parent6c9d1972b202299f6f4e41ec810e13d17be605e2
safe-alloc: simplify via reallocarray

* lib/safe-alloc.c: Do not include xalloc-oversized.h.
(safe_alloc_alloc_n, safe_alloc_realloc_n):
Use reallocarray to check for size or ptrdiff_t overflow.
* modules/reallocarray (License): Switch from LGPL to LGPLv2+, as
this is needed for safe-alloc and anyway is more appropriate for
this library function common with BSD.
* modules/safe-alloc (Depends-on): Depend on reallocarray
rather than xalloc-oversized.
ChangeLog
lib/safe-alloc.c
modules/reallocarray
modules/safe-alloc