From: chanthmiao Date: Sun, 5 Dec 2021 08:58:17 +0000 (+0800) Subject: Fix integer overflow for alpha like linux X-Git-Tag: v2.38-rc1~104^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db5aa5e5d8932c73f1b9f01fe567fa343898b825;p=thirdparty%2Futil-linux.git Fix integer overflow for alpha like linux --- diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c index ed6be244ec..76c5cac51b 100644 --- a/sys-utils/swapon.c +++ b/sys-utils/swapon.c @@ -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;