From bbdcf5a704517d35a76ba8b666075da9ffe39ac4 Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Tue, 23 Aug 2022 17:13:04 +0200 Subject: Sync with the latest Gnulib code (fa1ac7ec) --- gl/reallocarray.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gl/reallocarray.c') diff --git a/gl/reallocarray.c b/gl/reallocarray.c index 1fb2f3c7..70c1b478 100644 --- a/gl/reallocarray.c +++ b/gl/reallocarray.c @@ -1,6 +1,6 @@ /* reallocarray function that is glibc compatible. - Copyright (C) 2017-2021 Free Software Foundation, Inc. + Copyright (C) 2017-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -19,16 +19,15 @@ #include +#include #include #include -#include "intprops.h" - void * reallocarray (void *ptr, size_t nmemb, size_t size) { size_t nbytes; - if (INT_MULTIPLY_WRAPV (nmemb, size, &nbytes)) + if (ckd_mul (&nbytes, nmemb, size)) { errno = ENOMEM; return NULL; -- cgit v1.2.3-74-g34f1