Whamcloud - gitweb
Fix UBSAN if s_log_groups_per_flex is 31
[tools/e2fsprogs.git] / resize / resize2fs.c
index cfc81fc..243cd77 100644 (file)
@@ -2973,7 +2973,7 @@ blk64_t calculate_minimum_resize_size(ext2_filsys fs, int flags)
        blk64_t grp, data_needed, last_start;
        blk64_t overhead = 0;
        int old_desc_blocks;
-       int flexbg_size = 1 << fs->super->s_log_groups_per_flex;
+       unsigned flexbg_size = 1U << fs->super->s_log_groups_per_flex;
 
        /*
         * first figure out how many group descriptors we need to