summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/mksuncd/mksuncd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/mksuncd/mksuncd.c b/usr.sbin/mksuncd/mksuncd.c
index cd1114c0ed9..83645300588 100644
--- a/usr.sbin/mksuncd/mksuncd.c
+++ b/usr.sbin/mksuncd/mksuncd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mksuncd.c,v 1.4 2019/06/28 13:32:48 deraadt Exp $ */
+/* $OpenBSD: mksuncd.c,v 1.5 2021/12/23 09:17:19 jsg Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -264,7 +264,7 @@ adjust_label(int f, struct sun_disklabel *slp, int part, off_t start, off_t size
if (start > 65535)
errx(1, "start too large! %lld", (long long)start);
- if (part < 0 || part > 8)
+ if (part < 0 || part >= 8)
errx(1, "invalid partition: %d", part);
slp->sl_part[part].sdkp_cyloffset = start;
slp->sl_part[part].sdkp_nsectors =