Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/mknod improve arg clamping
details: https://anonhg.NetBSD.org/src/rev/1811444f8fa6
branches: trunk
changeset: 515906:1811444f8fa6
user: lukem <lukem%NetBSD.org@localhost>
date: Mon Oct 08 04:25:00 2001 +0000
description:
improve arg clamping
diffstat:
sbin/mknod/mknod.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 5f8fd81856ba -r 1811444f8fa6 sbin/mknod/mknod.c
--- a/sbin/mknod/mknod.c Mon Oct 08 04:20:43 2001 +0000
+++ b/sbin/mknod/mknod.c Mon Oct 08 04:25:00 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mknod.c,v 1.22 2001/10/08 04:20:44 lukem Exp $ */
+/* $NetBSD: mknod.c,v 1.23 2001/10/08 04:25:00 lukem Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
#include <sys/cdefs.h>
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.\n");
-__RCSID("$NetBSD: mknod.c,v 1.22 2001/10/08 04:20:44 lukem Exp $");
+__RCSID("$NetBSD: mknod.c,v 1.23 2001/10/08 04:25:00 lukem Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -59,7 +59,7 @@
static void usage(void);
-#define MAXARGS 8
+#define MAXARGS 3 /* 3 for bsdos, 2 for rest */
int
main(int argc, char **argv)
@@ -128,7 +128,7 @@
if (argc != 0)
usage();
} else {
- if (argc < 1 || argc >= MAXARGS)
+ if (argc < 1 || argc > MAXARGS)
usage();
}
Home |
Main Index |
Thread Index |
Old Index