diff options
author | smpatel <smpatel@FreeBSD.org> | 1996-04-10 00:53:22 +0000 |
---|---|---|
committer | smpatel <smpatel@FreeBSD.org> | 1996-04-10 00:53:22 +0000 |
commit | 4d30ab368ebacdbde2d18f8b248a5237060cf5cb (patch) | |
tree | 391352bb92ca0e80933aae3d494f2fd5200dc14f /sbin/sysctl | |
parent | 451e7461a93322614cc32fd67be8d23b08025664 (diff) | |
download | FreeBSD-src-4d30ab368ebacdbde2d18f8b248a5237060cf5cb.zip FreeBSD-src-4d30ab368ebacdbde2d18f8b248a5237060cf5cb.tar.gz |
Fix a core dump when the user gives "-w" without an "="
Diffstat (limited to 'sbin/sysctl')
-rw-r--r-- | sbin/sysctl/sysctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 11418fc..373d42e 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -40,7 +40,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "From: @(#)sysctl.c 8.1 (Berkeley) 6/6/93"; */ static const char rcsid[] = - "$Id: sysctl.c,v 1.8 1995/11/17 16:28:42 phk Exp $"; + "$Id: sysctl.c,v 1.9 1995/12/21 12:39:25 phk Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -137,6 +137,9 @@ parse(char *string) cp++; newval = cp; newsize = strlen(cp); + } else { + if (wflag) + usage(); } len = name2oid(bufp, mib); |