diff options
| author | Andreas Dilger <adilger@dilger.ca> | 2013-12-03 20:02:12 -0500 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2013-12-03 20:22:16 -0500 |
| commit | 2fe2d408a4e231eb5d2342b7f3dbd155563aa755 (patch) | |
| tree | 656713c8cbbe2c6c6d01ed79498fb1865bada71f /lib/ext2fs | |
| parent | 17abb05f515d72c78667108a95c904ef65bcc6aa (diff) | |
| download | android_external_e2fsprogs-2fe2d408a4e231eb5d2342b7f3dbd155563aa755.tar.gz android_external_e2fsprogs-2fe2d408a4e231eb5d2342b7f3dbd155563aa755.tar.bz2 android_external_e2fsprogs-2fe2d408a4e231eb5d2342b7f3dbd155563aa755.zip | |
mmp: fix 64-bit handling of s_mmp_block
Fix the checking of s_mmp_block in e2fsck_pass1() and
ext2fs_mmp_read() to handle the high 32 bits of s_blocks_count.
Remove redundant check of s_mmp_block in do_dump_mmp() right before
ext2fs_mmp_read() is called.
Also fix s_blocks_count_hi in check_backup_super_block(), since it
cannot use the ext2fs_blocks_count() helper easily.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib/ext2fs')
| -rw-r--r-- | lib/ext2fs/mmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ext2fs/mmp.c b/lib/ext2fs/mmp.c index 98562e78..fb266d1d 100644 --- a/lib/ext2fs/mmp.c +++ b/lib/ext2fs/mmp.c @@ -37,7 +37,7 @@ errcode_t ext2fs_mmp_read(ext2_filsys fs, blk64_t mmp_blk, void *buf) errcode_t retval = 0; if ((mmp_blk <= fs->super->s_first_data_block) || - (mmp_blk >= fs->super->s_blocks_count)) + (mmp_blk >= ext2fs_blocks_count(fs->super))) return EXT2_ET_MMP_BAD_BLOCK; /* ext2fs_open() reserves fd0,1,2 to avoid stdio collision, so checking |
