summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/paste.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2014-10-08 17:35:58 +0000
committernicm <nicm@openbsd.org>2014-10-08 17:35:58 +0000
commit64cf113cfda174a3f12284d623b95b76b54db679 (patch)
treef03be81fb0b9ec2b0468ad2d40689ed61b83a2c5 /usr.bin/tmux/paste.c
parentUse xrealloc(NULL, n, m) instead of xmalloc(n * m) to get overflow (diff)
downloadwireguard-openbsd-64cf113cfda174a3f12284d623b95b76b54db679.tar.xz
wireguard-openbsd-64cf113cfda174a3f12284d623b95b76b54db679.zip
Add xreallocarray and remove nmemb argument from xrealloc.
Diffstat (limited to 'usr.bin/tmux/paste.c')
-rw-r--r--usr.bin/tmux/paste.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/paste.c b/usr.bin/tmux/paste.c
index 88e03159d0a..7f88c147478 100644
--- a/usr.bin/tmux/paste.c
+++ b/usr.bin/tmux/paste.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: paste.c,v 1.24 2014/10/08 17:14:04 nicm Exp $ */
+/* $OpenBSD: paste.c,v 1.25 2014/10/08 17:35:58 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -279,7 +279,7 @@ paste_make_sample(struct paste_buffer *pb, int utf8flag)
len = pb->size;
if (len > width)
len = width;
- buf = xrealloc(NULL, len, 4 + 4);
+ buf = xreallocarray(NULL, len, 4 + 4);
if (utf8flag)
used = utf8_strvis(buf, pb->data, len, flags);