diff options
author | 2008-06-15 00:36:40 +0000 | |
---|---|---|
committer | 2008-06-15 00:36:40 +0000 | |
commit | 2307e81a18d90bcd6ca4b8a63fee943a5d76a54c (patch) | |
tree | 5ffa433b647b4ee397fca81c0d0b66b6c5ec5252 /sys/dev/isa | |
parent | Ensure that when using the ACPI tables the RVO field is initialized from the ctrl value. (diff) | |
download | wireguard-openbsd-2307e81a18d90bcd6ca4b8a63fee943a5d76a54c.tar.xz wireguard-openbsd-2307e81a18d90bcd6ca4b8a63fee943a5d76a54c.zip |
Don't bypass partition bounds check for RAW_PART. We now guarantee that
RAW_PART will always be 0 -> disksize, so the bounds check will always
pass for i/o's to valid addresses. Now the i/o will be properly truncated
if it goes past the end of the device. This prevents various adverse
impacts of issuing i/o's for data past the end of the device.
Repeatedly requested by todd@.
ok weingart@ deraadt@
Diffstat (limited to 'sys/dev/isa')
-rw-r--r-- | sys/dev/isa/mcd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c index 7e741776f77..427284806f5 100644 --- a/sys/dev/isa/mcd.c +++ b/sys/dev/isa/mcd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcd.c,v 1.49 2007/06/20 18:15:46 deraadt Exp $ */ +/* $OpenBSD: mcd.c,v 1.50 2008/06/15 00:36:41 krw Exp $ */ /* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */ /* @@ -507,8 +507,7 @@ mcdstrategy(bp) * Do bounds checking, adjust transfer. if error, process. * If end of partition, just return. */ - if (DISKPART(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, sc->sc_dk.dk_label, + if (bounds_check_with_label(bp, sc->sc_dk.dk_label, (sc->flags & (MCDF_WLABEL|MCDF_LABELLING)) != 0) <= 0) goto done; |