diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-04-18 16:53:11 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-04-18 20:59:52 -0700 |
commit | d4e52e5e3c25942710cab4d5a3e78a761f1fa77c (patch) | |
tree | 050db37585fbd817b7b20a6b6968e9dd0d454eaa /modules | |
parent | 6c9d1972b202299f6f4e41ec810e13d17be605e2 (diff) | |
download | gnulib-d4e52e5e3c25942710cab4d5a3e78a761f1fa77c.tar.gz |
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.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/reallocarray | 2 | ||||
-rw-r--r-- | modules/safe-alloc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/reallocarray b/modules/reallocarray index 11d32bb5fd..a64c6fd2d0 100644 --- a/modules/reallocarray +++ b/modules/reallocarray @@ -26,7 +26,7 @@ Include: <stdlib.h> License: -LGPL +LGPLv2+ Maintainer: all diff --git a/modules/safe-alloc b/modules/safe-alloc index 13e78dec7b..9453b49ee5 100644 --- a/modules/safe-alloc +++ b/modules/safe-alloc @@ -7,7 +7,7 @@ lib/safe-alloc.c m4/safe-alloc.m4 Depends-on: -xalloc-oversized +reallocarray configure.ac: gl_SAFE_ALLOC |