]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blobdiff - resize/resize2fs.c
Fix UBSAN if s_log_groups_per_flex is 31
[thirdparty/e2fsprogs.git] / resize / resize2fs.c
index cfc81fc78fe0bb6a4a0e4487dc5c86f09e0ea623..243cd777d8b0dfa9cf5c472d3a82e3159a5daf35 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