Coverity complains that when multiplying two 32 bit values that
eventually will be stored in a 64 bit value that it's possible
the math could overflow unless one of the values being multiplied
is type cast to the proper size.
Signed-off-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
do_warn(_("\nattempting to find secondary superblock...\n"));
if (verify_sb_blocksize(rsb) == 0) {
- skip = rsb->sb_agblocks * rsb->sb_blocksize;
+ skip = (__uint64_t)rsb->sb_agblocks * rsb->sb_blocksize;
if (skip >= XFS_AG_MIN_BYTES && skip <= XFS_AG_MAX_BYTES)
retval = __find_secondary_sb(rsb, skip, skip);
}