From 0e0dca6452dd8f9546d4c6f8545a09c6bd2f861c Mon Sep 17 00:00:00 2001 From: nyan Date: Tue, 1 Jul 2008 11:18:51 +0000 Subject: [PATCH] Fix off-by-one error. MFC after: 1 week --- sys/boot/i386/boot2/boot2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index 2eb8b68e82f3..753f0b1e328a 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.c @@ -472,7 +472,7 @@ parse() dsk.slice = WHOLE_DISK_SLICE; if (arg[1] == ',') { dsk.slice = *arg - '0' + 1; - if (dsk.slice > NDOSPART) + if (dsk.slice > NDOSPART + 1) return -1; arg += 2; }