Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/route Make prefixlen check to make sure its argument is...
details: https://anonhg.NetBSD.org/src/rev/77ab9d43d222
branches: trunk
changeset: 538333:77ab9d43d222
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Oct 18 00:16:25 2002 +0000
description:
Make prefixlen check to make sure its argument is present before deref
from openbsd
diffstat:
sbin/route/route.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 0d5b67a675e5 -r 77ab9d43d222 sbin/route/route.c
--- a/sbin/route/route.c Thu Oct 17 23:50:17 2002 +0000
+++ b/sbin/route/route.c Fri Oct 18 00:16:25 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.59 2002/07/20 08:36:27 grant Exp $ */
+/* $NetBSD: route.c,v 1.60 2002/10/18 00:16:25 itojun Exp $ */
/*
* Copyright (c) 1983, 1989, 1991, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: route.c,v 1.59 2002/07/20 08:36:27 grant Exp $");
+__RCSID("$NetBSD: route.c,v 1.60 2002/10/18 00:16:25 itojun Exp $");
#endif
#endif /* not lint */
@@ -934,7 +934,8 @@
forcenet++;
break;
case K_PREFIXLEN:
- argc--;
+ if (!--argc)
+ usage(1+*argv);
if (prefixlen(*++argv) == 128) {
forcenet = 0;
ishost = 1;
Home |
Main Index |
Thread Index |
Old Index