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/input.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/input.c')
-rw-r--r-- | usr.bin/tmux/input.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index 5970f98df10..f22ea03e4a6 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.70 2014/08/09 07:33:37 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.71 2014/10/08 17:35:58 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -909,7 +909,7 @@ input_ground(struct input_ctx *ictx) if (ictx->input_space > INPUT_BUF_START) { ictx->input_space = INPUT_BUF_START; - ictx->input_buf = xrealloc(ictx->input_buf, 1, INPUT_BUF_START); + ictx->input_buf = xrealloc(ictx->input_buf, INPUT_BUF_START); } } @@ -974,7 +974,7 @@ input_input(struct input_ctx *ictx) ictx->flags |= INPUT_DISCARD; return (0); } - ictx->input_buf = xrealloc(ictx->input_buf, 1, available); + ictx->input_buf = xrealloc(ictx->input_buf, available); ictx->input_space = available; } ictx->input_buf[ictx->input_len++] = ictx->ch; |