Correct `off by one' error when testing against size of disk.
This commit is contained in:
parent
a6e6938ba6
commit
9f329676c9
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: check.c,v 1.1.1.1 2000/08/07 09:23:40 leo Exp $ */
|
||||
/* $NetBSD: check.c,v 1.2 2000/10/23 06:56:00 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -95,7 +95,7 @@ ahdi_checklabel (ptable)
|
|||
i_end = ptable->parts[i].start + ptable->parts[i].size - 1;
|
||||
|
||||
/* Check partition does not extend past end of disk */
|
||||
if (i_end > ptable->secperunit) {
|
||||
if (i_end >= ptable->secperunit) {
|
||||
ahdi_errp1 = i;
|
||||
return (-5);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue