diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-10-17 20:38:04 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-10-17 20:38:04 +0000 |
commit | 22f561b7890646334d5bb8fd343778c99be14b14 (patch) | |
tree | 34e42eea4437ac17293b0328986f763eee11c418 /sbin | |
parent | 4da9efd86e0bde23dc6519f8ce1759642c7a1f78 (diff) |
Make prefixlen check to make sure its argument is present before deref; millert ok.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/route/route.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index f975845c689..eedaa2dd383 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.50 2002/06/10 21:19:24 itojun Exp $ */ +/* $OpenBSD: route.c,v 1.51 2002/10/17 20:38:03 jason Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)route.c 8.3 (Berkeley) 3/19/94"; #else -static char rcsid[] = "$OpenBSD: route.c,v 1.50 2002/06/10 21:19:24 itojun Exp $"; +static char rcsid[] = "$OpenBSD: route.c,v 1.51 2002/10/17 20:38:03 jason Exp $"; #endif #endif /* not lint */ @@ -735,7 +735,8 @@ newroute(argc, argv) forcenet++; break; case K_PREFIXLEN: - argc--; + if (!--argc) + usage(1+*argv); prefixlen(*++argv); break; case K_MTU: |