]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
mkfs: fix unintentional integer overflow
authorVivek Trivedi <t.vivek@samsung.com>
Sun, 20 Dec 2015 23:54:39 +0000 (10:54 +1100)
committerDave Chinner <david@fromorbit.com>
Sun, 20 Dec 2015 23:54:39 +0000 (10:54 +1100)
Fix unintentional integer overflow  in mkfs.
reported by coverity.

Signed-off-by: Vivek Trivedi <t.vivek@samsung.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
mkfs/xfs_mkfs.c

index 546108dda9085942bd95a3174dc0c28d780d26b0..b86d5be12efb92a0ce89e388e65b4cc0044ab2a7 100644 (file)
@@ -2022,7 +2022,7 @@ _("warning: sparse inodes not supported without CRC support, disabled.\n"));
                 * and the underlying volume is striped, then set rtextblocks
                 * to the stripe width.
                 */
-               int             rswidth;
+               __uint64_t      rswidth;
                __uint64_t      rtextbytes;
 
                if (!norsflag && !xi.risfile && !(!rtsize && xi.disfile))