summaryrefslogtreecommitdiff
path: root/usr.bin/vi/ex/ex_argv.c
diff options
context:
space:
mode:
authorMartijn van Duren <martijn@cvs.openbsd.org>2016-05-27 09:18:13 +0000
committerMartijn van Duren <martijn@cvs.openbsd.org>2016-05-27 09:18:13 +0000
commitb7a801368cabd897097c56917dc314dab493a361 (patch)
tree36d074d01f9baebfcab901d5af9aa056d3e19a84 /usr.bin/vi/ex/ex_argv.c
parent3e1124df121ad7546b99de5ff16aef9aeeeca556 (diff)
Revert CHAR_T removal. Some signedness flaws were introduced.
Found the hard way by jca@
Diffstat (limited to 'usr.bin/vi/ex/ex_argv.c')
-rw-r--r--usr.bin/vi/ex/ex_argv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/vi/ex/ex_argv.c b/usr.bin/vi/ex/ex_argv.c
index 1b369a5a5db..e8a6c5afd7f 100644
--- a/usr.bin/vi/ex/ex_argv.c
+++ b/usr.bin/vi/ex/ex_argv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_argv.c,v 1.19 2016/05/02 18:24:25 martijn Exp $ */
+/* $OpenBSD: ex_argv.c,v 1.20 2016/05/27 09:18:12 martijn Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -425,7 +425,7 @@ argv_alloc(SCR *sp, size_t len)
ap->len = 0;
if (ap->blen < len + 1) {
ap->blen = len + 1;
- REALLOC(sp, ap->bp, ap->blen);
+ REALLOCARRAY(sp, ap->bp, ap->blen, sizeof(CHAR_T));
if (ap->bp == NULL) {
ap->bp = NULL;
ap->blen = 0;