Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/config Fix off-by-one error; root on sd0i shoule be...
details: https://anonhg.NetBSD.org/src/rev/538add998c9f
branches: trunk
changeset: 514837:538add998c9f
user: enami <enami%NetBSD.org@localhost>
date: Tue Sep 11 05:11:59 2001 +0000
description:
Fix off-by-one error; root on sd0i shoule be rejected if maxpartition is 8.
diffstat:
usr.sbin/config/sem.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r e260b77b5c79 -r 538add998c9f usr.sbin/config/sem.c
--- a/usr.sbin/config/sem.c Tue Sep 11 04:35:43 2001 +0000
+++ b/usr.sbin/config/sem.c Tue Sep 11 05:11:59 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sem.c,v 1.27 2000/10/02 19:48:35 cgd Exp $ */
+/* $NetBSD: sem.c,v 1.28 2001/09/11 05:11:59 enami Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -638,7 +638,7 @@
*/
l = i = strlen(nv->nv_str);
cp = &nv->nv_str[l];
- if (l > 1 && *--cp >= 'a' && *cp <= 'a'+maxpartitions &&
+ if (l > 1 && *--cp >= 'a' && *cp < 'a' + maxpartitions &&
isdigit(cp[-1])) {
l--;
part = *cp - 'a';
Home |
Main Index |
Thread Index |
Old Index