diff options
Diffstat (limited to 'src/keymap.c')
-rw-r--r-- | src/keymap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/keymap.c b/src/keymap.c index 7f5777c9251..da2af98c2d6 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1363,7 +1363,7 @@ recognize the default bindings, just as `read-key-sequence' does. */) { USE_SAFE_ALLOCA; ptrdiff_t size = SCHARS (key_item), n; - if (INT_MULTIPLY_WRAPV (size, MAX_MULTIBYTE_LENGTH, &n)) + if (ckd_mul (&n, size, MAX_MULTIBYTE_LENGTH)) n = PTRDIFF_MAX; unsigned char *dst = SAFE_ALLOCA (n); unsigned char *p = dst; @@ -1411,7 +1411,7 @@ recognize the default bindings, just as `read-key-sequence' does. */) USE_SAFE_ALLOCA; ptrdiff_t size = SCHARS (lc_key), n; - if (INT_MULTIPLY_WRAPV (size, MAX_MULTIBYTE_LENGTH, &n)) + if (ckd_mul (&n, size, MAX_MULTIBYTE_LENGTH)) n = PTRDIFF_MAX; unsigned char *dst = SAFE_ALLOCA (n); @@ -2097,7 +2097,7 @@ For an approximate inverse of this, see `kbd'. */) /* This has one extra element at the end that we don't pass to Fconcat. */ ptrdiff_t size4; - if (INT_MULTIPLY_WRAPV (nkeys + nprefix, 4, &size4)) + if (ckd_mul (&size4, nkeys + nprefix, 4)) memory_full (SIZE_MAX); SAFE_ALLOCA_LISP (args, size4); |