summaryrefslogtreecommitdiff
path: root/usr.bin/apply
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-12-03 23:55:19 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-12-03 23:55:19 +0000
commit43fa0ab12fd936f3a38b8a029913891ac5dedd04 (patch)
tree34f30aebab8ec5c93bcb9767f73fedb1040410ff /usr.bin/apply
parent1d6c9c163e7265474233814de2f2cdc914dc0208 (diff)
off by one for string length calculation
Diffstat (limited to 'usr.bin/apply')
-rw-r--r--usr.bin/apply/apply.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/apply/apply.c b/usr.bin/apply/apply.c
index 03b5ff8f391..6af090450e1 100644
--- a/usr.bin/apply/apply.c
+++ b/usr.bin/apply/apply.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apply.c,v 1.5 1997/08/31 08:25:55 deraadt Exp $ */
+/* $OpenBSD: apply.c,v 1.6 1999/12/03 23:55:18 deraadt Exp $ */
/* $NetBSD: apply.c,v 1.3 1995/03/25 03:38:23 glass Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)apply.c 8.4 (Berkeley) 4/4/94";
#else
-static char rcsid[] = "$OpenBSD: apply.c,v 1.5 1997/08/31 08:25:55 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: apply.c,v 1.6 1999/12/03 23:55:18 deraadt Exp $";
#endif
#endif /* not lint */
@@ -159,7 +159,7 @@ main(argc, argv)
* there's enough space to build it.
*/
for (l = strlen(cmd), i = 0; i < nargs; i++)
- l += strlen(argv[i]);
+ l += strlen(argv[i+1]);
if (l > clen && (c = realloc(c, clen = l)) == NULL)
err(1, NULL);