diff options
Diffstat (limited to 'malloc/dynarray_resize.c')
-rw-r--r-- | malloc/dynarray_resize.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/malloc/dynarray_resize.c b/malloc/dynarray_resize.c index bb50e32f9a..5c60927f37 100644 --- a/malloc/dynarray_resize.c +++ b/malloc/dynarray_resize.c @@ -18,6 +18,7 @@ #include <dynarray.h> #include <errno.h> +#include <intprops.h> #include <stdlib.h> #include <string.h> @@ -37,7 +38,7 @@ __libc_dynarray_resize (struct dynarray_header *list, size_t size, over-allocation here. */ size_t new_size_bytes; - if (__builtin_mul_overflow (size, element_size, &new_size_bytes)) + if (INT_MULTIPLY_WRAPV (size, element_size, &new_size_bytes)) { /* Overflow. */ __set_errno (ENOMEM); |