diff options
author | 2014-10-08 17:35:58 +0000 | |
---|---|---|
committer | 2014-10-08 17:35:58 +0000 | |
commit | 64cf113cfda174a3f12284d623b95b76b54db679 (patch) | |
tree | f03be81fb0b9ec2b0468ad2d40689ed61b83a2c5 /usr.bin/tmux/cmd-capture-pane.c | |
parent | Use xrealloc(NULL, n, m) instead of xmalloc(n * m) to get overflow (diff) | |
download | wireguard-openbsd-64cf113cfda174a3f12284d623b95b76b54db679.tar.xz wireguard-openbsd-64cf113cfda174a3f12284d623b95b76b54db679.zip |
Add xreallocarray and remove nmemb argument from xrealloc.
Diffstat (limited to 'usr.bin/tmux/cmd-capture-pane.c')
-rw-r--r-- | usr.bin/tmux/cmd-capture-pane.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-capture-pane.c b/usr.bin/tmux/cmd-capture-pane.c index b6d57955c06..f9f5682c35b 100644 --- a/usr.bin/tmux/cmd-capture-pane.c +++ b/usr.bin/tmux/cmd-capture-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-capture-pane.c,v 1.28 2014/06/20 10:46:59 nicm Exp $ */ +/* $OpenBSD: cmd-capture-pane.c,v 1.29 2014/10/08 17:35:58 nicm Exp $ */ /* * Copyright (c) 2009 Jonathan Alvarado <radobobo@users.sourceforge.net> @@ -48,7 +48,7 @@ const struct cmd_entry cmd_capture_pane_entry = { char * cmd_capture_pane_append(char *buf, size_t *len, char *line, size_t linelen) { - buf = xrealloc(buf, 1, *len + linelen + 1); + buf = xrealloc(buf, *len + linelen + 1); memcpy(buf + *len, line, linelen); *len += linelen; return (buf); |