summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-11-24 23:18:45 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-11-24 23:18:45 +0000
commit0af26cd70a6d4fd5eafaab2f36b298ea58fe19ab (patch)
tree91575f577381be75e61d91d9a1a4bb13730d395d
parentebffcae6f849ee690db1ddaa51d0f0979023d694 (diff)
Fix truncation of options list in getopts builtin.
Noticed by Matthieu Herrb <Mathieu.Herrb@mipnet.fr>
-rw-r--r--bin/sh/options.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/sh/options.c b/bin/sh/options.c
index 7c7f1c94606..1d54c05451b 100644
--- a/bin/sh/options.c
+++ b/bin/sh/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.5 1996/11/24 17:43:03 millert Exp $ */
+/* $OpenBSD: options.c,v 1.6 1996/11/24 23:18:44 millert Exp $ */
/* $NetBSD: options.c,v 1.19 1996/11/06 01:17:11 christos Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 5/4/95";
#else
-static char rcsid[] = "$OpenBSD: options.c,v 1.5 1996/11/24 17:43:03 millert Exp $";
+static char rcsid[] = "$OpenBSD: options.c,v 1.6 1996/11/24 23:18:44 millert Exp $";
#endif
#endif /* not lint */
@@ -423,7 +423,7 @@ getopts(optstr, optvar, optfirst, optnext, optptr)
p = **optnext;
if (p == NULL || *p != '-' || *++p == '\0') {
atend:
- **optnext = NULL;
+ *optnext = NULL;
ind = *optnext - optfirst + 1;
done = 1;
goto out;