diff options
author | 2000-09-20 17:30:56 +0000 | |
---|---|---|
committer | 2000-09-20 17:30:56 +0000 | |
commit | 4afb8469a7a42701e6b6fde53cb5d976d9526b87 (patch) | |
tree | 02b2a292f5bf145a5691cf6127ad9ede77a13313 | |
parent | Extend the region in which we allow mapping unmapped PCI devices. (diff) | |
download | wireguard-openbsd-4afb8469a7a42701e6b6fde53cb5d976d9526b87.tar.xz wireguard-openbsd-4afb8469a7a42701e6b6fde53cb5d976d9526b87.zip |
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; /* |