diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-09-20 17:30:57 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-09-20 17:30:57 +0000 |
commit | 7d56032c82fa70600a62adf0a833a2d84915f79a (patch) | |
tree | e4d6e149ef763a1aa80929913b6269e0092916ae | |
parent | 40a95e4cfb321729804117a3c4a64ecf16182a73 (diff) |
Off by one in a validity check
-rw-r--r-- | sys/kern/subr_extent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_extent.c b/sys/kern/subr_extent.c index 592a0ffa73c..b2b5b1d0b8d 100644 --- a/sys/kern/subr_extent.c +++ b/sys/kern/subr_extent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_extent.c,v 1.9 2000/03/15 15:58:40 mickey Exp $ */ +/* $OpenBSD: subr_extent.c,v 1.10 2000/09/20 17:30:56 niklas Exp $ */ /* $NetBSD: subr_extent.c,v 1.7 1996/11/21 18:46:34 cgd Exp $ */ /*- @@ -644,7 +644,7 @@ extent_alloc_subregion1(ex, substart, subend, size, alignment, skew, boundary, * Check from the current starting point to the * end of the subregion. */ - if (LE_OV(newstart, size, subend) == 0) + if (!LE_OV(newstart, size - 1, subend)) goto fail; /* |