Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/atari/stand/ahdilabel Correct `off by one' error wh...



details:   https://anonhg.NetBSD.org/src/rev/2a41a1d92fc2
branches:  trunk
changeset: 498415:2a41a1d92fc2
user:      jdc <jdc%NetBSD.org@localhost>
date:      Mon Oct 23 06:56:00 2000 +0000

description:
Correct `off by one' error when testing against size of disk.

diffstat:

 sys/arch/atari/stand/ahdilabel/check.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 690a6833604f -r 2a41a1d92fc2 sys/arch/atari/stand/ahdilabel/check.c
--- a/sys/arch/atari/stand/ahdilabel/check.c    Mon Oct 23 06:45:18 2000 +0000
+++ b/sys/arch/atari/stand/ahdilabel/check.c    Mon Oct 23 06:56:00 2000 +0000
@@ -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 @@
                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);
                }



Home | Main Index | Thread Index | Old Index