Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sbin/route Pull up revision 1.60 (requested by itojun i...



details:   https://anonhg.NetBSD.org/src/rev/27f6d3cf3eee
branches:  netbsd-1-6
changeset: 529174:27f6d3cf3eee
user:      lukem <lukem%NetBSD.org@localhost>
date:      Mon Oct 21 01:52:31 2002 +0000

description:
Pull up revision 1.60 (requested by itojun in ticket #923):
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 f5dad4336fef -r 27f6d3cf3eee sbin/route/route.c
--- a/sbin/route/route.c        Mon Oct 21 01:50:17 2002 +0000
+++ b/sbin/route/route.c        Mon Oct 21 01:52:31 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route.c,v 1.54.2.2 2002/06/06 08:41:51 lukem Exp $     */
+/*     $NetBSD: route.c,v 1.54.2.3 2002/10/21 01:52:31 lukem 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.54.2.2 2002/06/06 08:41:51 lukem Exp $");
+__RCSID("$NetBSD: route.c,v 1.54.2.3 2002/10/21 01:52:31 lukem 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