summaryrefslogtreecommitdiff
path: root/src/gtkutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r--src/gtkutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 4cc0f9f15b4..22b2a70f279 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -694,8 +694,8 @@ get_utf8_string (const char *str)
len = strlen (str);
ptrdiff_t alloc;
- if (INT_MULTIPLY_WRAPV (nr_bad, 4, &alloc)
- || INT_ADD_WRAPV (len + 1, alloc, &alloc)
+ if (ckd_mul (&alloc, nr_bad, 4)
+ || ckd_add (&alloc, alloc, len + 1)
|| SIZE_MAX < alloc)
memory_full (SIZE_MAX);
up = utf8_str = xmalloc (alloc);