]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Fix integer overflow for alpha like linux
authorchanthmiao <chanthmiao@outlook.com>
Sun, 5 Dec 2021 08:58:17 +0000 (16:58 +0800)
committerchanthmiao <chanthmiao@outlook.com>
Sun, 5 Dec 2021 08:58:17 +0000 (16:58 +0800)
sys-utils/swapon.c

index ed6be244ec18458a54a9e16239a6e5ada4b0a3d8..76c5cac51bd05d0cb4d958aee2b3dc4c5ae144b2 100644 (file)
@@ -543,7 +543,7 @@ static int swapon_checks(const struct swapon_ctl *ctl, struct swap_device *dev)
 
        /* test for holes by LBT */
        if (S_ISREG(st.st_mode)) {
-               if (st.st_blocks * 512 < st.st_size) {
+               if (st.st_blocks * 512L < st.st_size) {
                        warnx(_("%s: skipping - it appears to have holes."),
                                dev->path);
                        goto err;