summaryrefslogtreecommitdiffstats
path: root/paste.c
diff options
context:
space:
mode:
Diffstat (limited to 'paste.c')
-rw-r--r--paste.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/paste.c b/paste.c
index 4af8cccf..ce1f27d3 100644
--- a/paste.c
+++ b/paste.c
@@ -278,7 +278,7 @@ paste_make_sample(struct paste_buffer *pb, int utf8flag)
len = pb->size;
if (len > width)
len = width;
- buf = xmalloc(len * 4 + 4);
+ buf = xreallocarray(NULL, len, 4 + 4);
if (utf8flag)
used = utf8_strvis(buf, pb->data, len, flags);