summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-04-23 07:45:50 +0000
committerderaadt <deraadt@openbsd.org>2015-04-23 07:45:50 +0000
commit471ad77d543812b40bdf783a753971288015bded (patch)
tree5e672a73b47f46ac2f72c6951caee959b2fd399f
parentDo not need to buf[0] = 0 before strlcpy(buf, ... (diff)
downloadwireguard-openbsd-471ad77d543812b40bdf783a753971288015bded.tar.xz
wireguard-openbsd-471ad77d543812b40bdf783a753971288015bded.zip
use reallocarray instead of calloc; avoid the zero before infill
ok nicm
-rw-r--r--usr.bin/tmux/grid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/grid.c b/usr.bin/tmux/grid.c
index 9d750a14dba..0e2850d2e60 100644
--- a/usr.bin/tmux/grid.c
+++ b/usr.bin/tmux/grid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grid.c,v 1.41 2014/10/08 17:35:58 nicm Exp $ */
+/* $OpenBSD: grid.c,v 1.42 2015/04/23 07:45:50 deraadt Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -657,7 +657,7 @@ grid_duplicate_lines(struct grid *dst, u_int dy, struct grid *src, u_int sy,
memcpy(dstl, srcl, sizeof *dstl);
if (srcl->cellsize != 0) {
- dstl->celldata = xcalloc(
+ dstl->celldata = xreallocarray(NULL,
srcl->cellsize, sizeof *dstl->celldata);
memcpy(dstl->celldata, srcl->celldata,
srcl->cellsize * sizeof *dstl->celldata);