From 7d56032c82fa70600a62adf0a833a2d84915f79a Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Wed, 20 Sep 2000 17:30:57 +0000 Subject: Off by one in a validity check --- sys/kern/subr_extent.c | 4 ++-- 1 file 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; /* -- cgit v1.2.3