diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c index 7951b7ac322..0c46b201586 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -3343,7 +3343,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, | |||
| 3343 | else | 3343 | else |
| 3344 | nbytes = SBYTES (str); | 3344 | nbytes = SBYTES (str); |
| 3345 | 3345 | ||
| 3346 | if (INT_ADD_WRAPV (ssl->bytes, nbytes, &nbytes)) | 3346 | if (ckd_add (&nbytes, nbytes, ssl->bytes)) |
| 3347 | memory_full (SIZE_MAX); | 3347 | memory_full (SIZE_MAX); |
| 3348 | ssl->bytes = nbytes; | 3348 | ssl->bytes = nbytes; |
| 3349 | 3349 | ||
| @@ -3357,7 +3357,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, | |||
| 3357 | else | 3357 | else |
| 3358 | nbytes = SBYTES (str2); | 3358 | nbytes = SBYTES (str2); |
| 3359 | 3359 | ||
| 3360 | if (INT_ADD_WRAPV (ssl->bytes, nbytes, &nbytes)) | 3360 | if (ckd_add (&nbytes, nbytes, ssl->bytes)) |
| 3361 | memory_full (SIZE_MAX); | 3361 | memory_full (SIZE_MAX); |
| 3362 | ssl->bytes = nbytes; | 3362 | ssl->bytes = nbytes; |
| 3363 | } | 3363 | } |
| @@ -3429,7 +3429,7 @@ overlay_strings (ptrdiff_t pos, struct window *w, unsigned char **pstr) | |||
| 3429 | unsigned char *p; | 3429 | unsigned char *p; |
| 3430 | ptrdiff_t total; | 3430 | ptrdiff_t total; |
| 3431 | 3431 | ||
| 3432 | if (INT_ADD_WRAPV (overlay_heads.bytes, overlay_tails.bytes, &total)) | 3432 | if (ckd_add (&total, overlay_heads.bytes, overlay_tails.bytes)) |
| 3433 | memory_full (SIZE_MAX); | 3433 | memory_full (SIZE_MAX); |
| 3434 | if (total > overlay_str_len) | 3434 | if (total > overlay_str_len) |
| 3435 | overlay_str_buf = xpalloc (overlay_str_buf, &overlay_str_len, | 3435 | overlay_str_buf = xpalloc (overlay_str_buf, &overlay_str_len, |