summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorle <le@FreeBSD.org>2004-03-09 12:45:43 +0000
committerle <le@FreeBSD.org>2004-03-09 12:45:43 +0000
commit97051410207dab26540eac36237466ff6f2f9be5 (patch)
tree61a492a71f7ef95e0b7c2f4af0088492508072dd
parent24ee2482d3d3d2567ad1509e8bfa3c7509e142f0 (diff)
downloadFreeBSD-src-97051410207dab26540eac36237466ff6f2f9be5.zip
FreeBSD-src-97051410207dab26540eac36237466ff6f2f9be5.tar.gz
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
-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 007411a..eda4c2a 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
OpenPOWER on IntegriCloud