summaryrefslogtreecommitdiffstats
path: root/paste.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2014-10-21 07:11:44 +0100
committerThomas Adam <thomas@xteddy.org>2014-10-21 07:11:44 +0100
commit562af864bd8ab06c416075b5742ce3bbcf6d0610 (patch)
tree2c3900dd6b284aa52441c3fde9dfdf8383d87b54 /paste.c
parentb6aef2490f086f3404f439308bb1746ec5134e9a (diff)
parent0a1a88d63caf3a0e8b4440686e73e1f0f690e03c (diff)
Merge branch 'obsd-master'
Conflicts: Makefile cmd-list-commands.c cmd-suspend-client.c job.c tmux.h xmalloc.c
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);