Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be42841c authored by Tom Cherry's avatar Tom Cherry Committed by Gerrit Code Review
Browse files

Merge "fsmgr: fix integer overflow in fs_mgr"

parents a5032be8 4a489450
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -331,7 +331,7 @@ static bool read_ext4_superblock(const std::string& blk_device, const FstabEntry
            // try backup superblock, if main superblock is corrupted
            for (unsigned int blocksize = EXT4_MIN_BLOCK_SIZE; blocksize <= EXT4_MAX_BLOCK_SIZE;
                 blocksize *= 2) {
                unsigned int superblock = blocksize * 8;
                uint64_t superblock = blocksize * 8;
                if (blocksize == EXT4_MIN_BLOCK_SIZE) superblock++;

                if (TEMP_FAILURE_RETRY(pread(fd, sb, sizeof(*sb), superblock * blocksize)) !=