diff options
author | Po Lu <luangruo@yahoo.com> | 2023-05-18 09:04:57 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-05-18 09:04:57 +0800 |
commit | 074c0268fd32d6527e124cff386bb6b15cf90017 (patch) | |
tree | 62111c3c70d46a738f15514e988a707409ca45f4 /lib-src | |
parent | db48eff8cf4a88393c0209f663ca194ee37fa747 (diff) | |
parent | 5ef169ed701fa4f850fdca5563cdd468207d5d4f (diff) | |
download | emacs-074c0268fd32d6527e124cff386bb6b15cf90017.tar.gz |
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/etags.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c index 2c6b4e7a630..147ecbd7c1b 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -109,6 +109,7 @@ University of California, as described above. */ #include <limits.h> #include <unistd.h> #include <stdarg.h> +#include <stdckdint.h> #include <stdlib.h> #include <string.h> #include <sysstdio.h> @@ -8038,7 +8039,7 @@ xnmalloc (ptrdiff_t nitems, ptrdiff_t item_size) ptrdiff_t nbytes; assume (0 <= nitems); assume (0 < item_size); - if (INT_MULTIPLY_WRAPV (nitems, item_size, &nbytes)) + if (ckd_mul (&nbytes, nitems, item_size)) memory_full (); return xmalloc (nbytes); } @@ -8049,7 +8050,7 @@ xnrealloc (void *pa, ptrdiff_t nitems, ptrdiff_t item_size) ptrdiff_t nbytes; assume (0 <= nitems); assume (0 < item_size); - if (INT_MULTIPLY_WRAPV (nitems, item_size, &nbytes) || SIZE_MAX < nbytes) + if (ckd_mul (&nbytes, nitems, item_size) || SIZE_MAX < nbytes) memory_full (); void *result = realloc (pa, nbytes); if (!result) |