aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vinum
diff options
context:
space:
mode:
authorLukas Ertl <le@FreeBSD.org>2004-03-09 12:45:43 +0000
committerLukas Ertl <le@FreeBSD.org>2004-03-09 12:45:43 +0000
commit6c8740f8996b8046f1811481a8b1498890d01779 (patch)
tree61a492a71f7ef95e0b7c2f4af0088492508072dd /sys/dev/vinum
parent33dc54913637f2da1100aed91c4bb647d74071c0 (diff)
downloadsrc-6c8740f8996b8046f1811481a8b1498890d01779.tar.gz
src-6c8740f8996b8046f1811481a8b1498890d01779.zip
Fix an integer overflow when dealing with very large volumes. This bug
prevented newfs to work on volumes that are larger than 1TB. PR: 63577 Submitted by: Masaki Takakashi <mtakahashi@se.gtd.cosmo.co.jp> Approved by: grog (mentor), bde
Notes
Notes: svn path=/head/; revision=126776
Diffstat (limited to 'sys/dev/vinum')
-rw-r--r--sys/dev/vinum/vinumrequest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/vinum/vinumrequest.c b/sys/dev/vinum/vinumrequest.c
index 007411aa0459..eda4c2aa3f97 100644
--- a/sys/dev/vinum/vinumrequest.c
+++ b/sys/dev/vinum/vinumrequest.c
@@ -1018,7 +1018,7 @@ sdio(struct buf *bp)
int
vinum_bounds_check(struct buf *bp, struct volume *vol)
{
- int maxsize = vol->size; /* size of the partition (sectors) */
+ int64_t maxsize = vol->size; /* size of the partition (sectors) */
int size = (bp->b_bcount + DEV_BSIZE - 1) >> DEV_BSHIFT; /* size of this request (sectors) */
#ifdef LABELSECTOR