From: Nathan Scott Date: Fri, 27 Jun 2003 00:50:25 +0000 (+0000) Subject: Fix botched cast in xfs_repair superblock size checks X-Git-Tag: v2.6.0~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=601e76620f9200a444e343b4f81a7fed84f126f0;p=thirdparty%2Fxfsprogs-dev.git Fix botched cast in xfs_repair superblock size checks --- diff --git a/doc/CHANGES b/doc/CHANGES index ba6c1560b..10076c954 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -5,6 +5,7 @@ xfsprogs-2.5.2 (25 June 2003) for work-in-progress on xfs_repair and xfs_copy. - Fix missing initialisation of stripe unit/width alignment information during libxfs_mount. + - Fix botched repair typecast for multi-terabyte filesystems. xfsprogs-2.5.1 (23 June 2003) - Fix libdisk device driver (volume managers) detection code diff --git a/repair/sb.c b/repair/sb.c index ef9e03526..4924dc3f4 100644 --- a/repair/sb.c +++ b/repair/sb.c @@ -276,9 +276,9 @@ verify_sb(xfs_sb_t *sb, int is_primary_sb) if (sb->sb_dblocks == 0 || sb->sb_dblocks > - (__uint64_t)(sb->sb_agcount * sb->sb_agblocks) || + ((__uint64_t)sb->sb_agcount * sb->sb_agblocks) || sb->sb_dblocks < - (__uint64_t)((sb->sb_agcount - 1) * sb->sb_agblocks + ((__uint64_t)(sb->sb_agcount - 1) * sb->sb_agblocks + XFS_MIN_AG_BLOCKS)) return(XR_BAD_FS_SIZE_DATA);