aboutsummaryrefslogtreecommitdiffstats
path: root/lib/malloc/dynarray_resize.c
diff options
context:
space:
mode:
authorPaul Eggert2023-05-14 18:51:22 -0700
committerPaul Eggert2023-05-14 19:28:09 -0700
commitb77d357ea356134fbc159797b34498b7a0006dc9 (patch)
tree1a1d03db84c1b2aac7f6e8dafcdc3e952192c854 /lib/malloc/dynarray_resize.c
parente7dc30c1d58c602ccc4b7b9c98c0ea07f5631675 (diff)
downloademacs-b77d357ea356134fbc159797b34498b7a0006dc9.tar.gz
emacs-b77d357ea356134fbc159797b34498b7a0006dc9.zip
Update from Gnulib by running admin/merge-gnulib
* lib/dirent-private.h, m4/codeset.m4, m4/locale-fr.m4, m4/musl.m4: New files, from Gnulib.
Diffstat (limited to 'lib/malloc/dynarray_resize.c')
-rw-r--r--lib/malloc/dynarray_resize.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/malloc/dynarray_resize.c b/lib/malloc/dynarray_resize.c
index 7ecd4de63b9..014f98c330e 100644
--- a/lib/malloc/dynarray_resize.c
+++ b/lib/malloc/dynarray_resize.c
@@ -22,7 +22,7 @@
22 22
23#include <dynarray.h> 23#include <dynarray.h>
24#include <errno.h> 24#include <errno.h>
25#include <intprops.h> 25#include <stdckdint.h>
26#include <stdlib.h> 26#include <stdlib.h>
27#include <string.h> 27#include <string.h>
28 28
@@ -42,7 +42,7 @@ __libc_dynarray_resize (struct dynarray_header *list, size_t size,
42 over-allocation here. */ 42 over-allocation here. */
43 43
44 size_t new_size_bytes; 44 size_t new_size_bytes;
45 if (INT_MULTIPLY_WRAPV (size, element_size, &new_size_bytes)) 45 if (ckd_mul (&new_size_bytes, size, element_size))
46 { 46 {
47 /* Overflow. */ 47 /* Overflow. */
48 __set_errno (ENOMEM); 48 __set_errno (ENOMEM);