diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 16:27:12 +0100 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 16:27:12 +0100 |
commit | 5be04ec2ceb1df77afbca4fcbf9e92a712612d6f (patch) | |
tree | 2b2e1c71dffae827c8e45cd4cccc375093d03486 /gl/malloc | |
parent | 6d1d1dac32841d5ca6ee51bb09b30a6c604b17e2 (diff) | |
download | monitoring-plugins-5be04ec2ceb1df77afbca4fcbf9e92a712612d6f.tar.gz |
Sync with the latest Gnulib code (d4ec02b3cc)
Diffstat (limited to 'gl/malloc')
-rw-r--r-- | gl/malloc/dynarray-skeleton.c | 2 | ||||
-rw-r--r-- | gl/malloc/dynarray.h | 2 | ||||
-rw-r--r-- | gl/malloc/dynarray_at_failure.c | 2 | ||||
-rw-r--r-- | gl/malloc/dynarray_emplace_enlarge.c | 6 | ||||
-rw-r--r-- | gl/malloc/dynarray_finalize.c | 2 | ||||
-rw-r--r-- | gl/malloc/dynarray_resize.c | 6 | ||||
-rw-r--r-- | gl/malloc/dynarray_resize_clear.c | 2 |
7 files changed, 11 insertions, 11 deletions
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 @@ | |||
1 | /* Type-safe arrays which grow dynamically. | 1 | /* Type-safe arrays which grow dynamically. |
2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2024 Free Software Foundation, Inc. |
3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
4 | 4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | 5 | 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 @@ | |||
1 | /* Type-safe arrays which grow dynamically. Shared definitions. | 1 | /* Type-safe arrays which grow dynamically. Shared definitions. |
2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2024 Free Software Foundation, Inc. |
3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
4 | 4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | 5 | 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 @@ | |||
1 | /* Report an dynamic array index out of bounds condition. | 1 | /* Report an dynamic array index out of bounds condition. |
2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2024 Free Software Foundation, Inc. |
3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
4 | 4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | 5 | 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 @@ | |||
1 | /* Increase the size of a dynamic array in preparation of an emplace operation. | 1 | /* Increase the size of a dynamic array in preparation of an emplace operation. |
2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2024 Free Software Foundation, Inc. |
3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
4 | 4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
@@ -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 | ||
@@ -56,7 +56,7 @@ __libc_dynarray_emplace_enlarge (struct dynarray_header *list, | |||
56 | } | 56 | } |
57 | 57 | ||
58 | size_t new_size; | 58 | size_t new_size; |
59 | if (INT_MULTIPLY_WRAPV (new_allocated, element_size, &new_size)) | 59 | if (ckd_mul (&new_size, new_allocated, element_size)) |
60 | return false; | 60 | return false; |
61 | void *new_array; | 61 | void *new_array; |
62 | if (list->array == scratch) | 62 | 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 @@ | |||
1 | /* Copy the dynamically-allocated area to an explicitly-sized heap allocation. | 1 | /* Copy the dynamically-allocated area to an explicitly-sized heap allocation. |
2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2024 Free Software Foundation, Inc. |
3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
4 | 4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | 5 | 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 @@ | |||
1 | /* Increase the size of a dynamic array. | 1 | /* Increase the size of a dynamic array. |
2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2024 Free Software Foundation, Inc. |
3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
4 | 4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
@@ -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); |
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 @@ | |||
1 | /* Increase the size of a dynamic array and clear the new part. | 1 | /* Increase the size of a dynamic array and clear the new part. |
2 | Copyright (C) 2017-2023 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2024 Free Software Foundation, Inc. |
3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
4 | 4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |