diff options
| author | Thomas Moestl <tmm@FreeBSD.org> | 2001-07-29 21:01:13 +0000 |
|---|---|---|
| committer | Thomas Moestl <tmm@FreeBSD.org> | 2001-07-29 21:01:13 +0000 |
| commit | 9c4968d1524c5e42d974ecfa3a4bc4fb20e524bd (patch) | |
| tree | 0ad6965063ec24a37679d9b7483ff3287799fd0d | |
| parent | 7b22794017f7482588d6ca6d8d0cac9da3704355 (diff) | |
Notes
| -rw-r--r-- | sys/dev/ata/atapi-cd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index da0ce2173d30..89abf6984c8a 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -1132,7 +1132,11 @@ acd_start(struct atapi_softc *atp) lastlba = cdp->disk_size; } - count = (bp->bio_bcount + (blocksize - 1)) / blocksize; + if (bp->bio_bcount % blocksize != 0) { + biofinish(bp, NULL, EINVAL); + return; + } + count = bp->bio_bcount / blocksize; if (bp->bio_cmd == BIO_READ) { /* if transfer goes beyond range adjust it to be within limits */ |
