From 5be04ec2ceb1df77afbca4fcbf9e92a712612d6f Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:27:12 +0100 Subject: Sync with the latest Gnulib code (d4ec02b3cc) --- gl/malloc/dynarray-skeleton.c | 2 +- gl/malloc/dynarray.h | 2 +- gl/malloc/dynarray_at_failure.c | 2 +- gl/malloc/dynarray_emplace_enlarge.c | 6 +++--- gl/malloc/dynarray_finalize.c | 2 +- gl/malloc/dynarray_resize.c | 6 +++--- gl/malloc/dynarray_resize_clear.c | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) (limited to 'gl/malloc') diff --git a/gl/malloc/dynarray-skeleton.c b/gl/malloc/dynarray-skeleton.c index 580c278b..a95241ab 100644 --- a/gl/malloc/dynarray-skeleton.c +++ b/gl/malloc/dynarray-skeleton.c @@ -1,5 +1,5 @@ /* Type-safe arrays which grow dynamically. - Copyright (C) 2017-2023 Free Software Foundation, Inc. + Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/malloc/dynarray.h b/gl/malloc/dynarray.h index a9a3b085..3163e278 100644 --- a/gl/malloc/dynarray.h +++ b/gl/malloc/dynarray.h @@ -1,5 +1,5 @@ /* Type-safe arrays which grow dynamically. Shared definitions. - Copyright (C) 2017-2023 Free Software Foundation, Inc. + Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/malloc/dynarray_at_failure.c b/gl/malloc/dynarray_at_failure.c index ebc93109..95e34e7a 100644 --- a/gl/malloc/dynarray_at_failure.c +++ b/gl/malloc/dynarray_at_failure.c @@ -1,5 +1,5 @@ /* Report an dynamic array index out of bounds condition. - Copyright (C) 2017-2023 Free Software Foundation, Inc. + Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/malloc/dynarray_emplace_enlarge.c b/gl/malloc/dynarray_emplace_enlarge.c index 7da53931..7bdba159 100644 --- a/gl/malloc/dynarray_emplace_enlarge.c +++ b/gl/malloc/dynarray_emplace_enlarge.c @@ -1,5 +1,5 @@ /* Increase the size of a dynamic array in preparation of an emplace operation. - Copyright (C) 2017-2023 Free Software Foundation, Inc. + Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -56,7 +56,7 @@ __libc_dynarray_emplace_enlarge (struct dynarray_header *list, } size_t new_size; - if (INT_MULTIPLY_WRAPV (new_allocated, element_size, &new_size)) + if (ckd_mul (&new_size, new_allocated, element_size)) return false; void *new_array; if (list->array == scratch) diff --git a/gl/malloc/dynarray_finalize.c b/gl/malloc/dynarray_finalize.c index 673595a5..52764f73 100644 --- a/gl/malloc/dynarray_finalize.c +++ b/gl/malloc/dynarray_finalize.c @@ -1,5 +1,5 @@ /* Copy the dynamically-allocated area to an explicitly-sized heap allocation. - Copyright (C) 2017-2023 Free Software Foundation, Inc. + Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/malloc/dynarray_resize.c b/gl/malloc/dynarray_resize.c index 7ecd4de6..7323f8ee 100644 --- a/gl/malloc/dynarray_resize.c +++ b/gl/malloc/dynarray_resize.c @@ -1,5 +1,5 @@ /* Increase the size of a dynamic array. - Copyright (C) 2017-2023 Free Software Foundation, Inc. + Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -42,7 +42,7 @@ __libc_dynarray_resize (struct dynarray_header *list, size_t size, over-allocation here. */ size_t new_size_bytes; - if (INT_MULTIPLY_WRAPV (size, element_size, &new_size_bytes)) + if (ckd_mul (&new_size_bytes, size, element_size)) { /* Overflow. */ __set_errno (ENOMEM); diff --git a/gl/malloc/dynarray_resize_clear.c b/gl/malloc/dynarray_resize_clear.c index bb23c522..aa17f740 100644 --- a/gl/malloc/dynarray_resize_clear.c +++ b/gl/malloc/dynarray_resize_clear.c @@ -1,5 +1,5 @@ /* Increase the size of a dynamic array and clear the new part. - Copyright (C) 2017-2023 Free Software Foundation, Inc. + Copyright (C) 2017-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or -- cgit v1.2.3-74-g34f1