From: Ruediger Meier Date: Thu, 6 Apr 2017 07:56:03 +0000 (+0200) Subject: fincore: fix multiplication overflow X-Git-Tag: v2.30-rc1~130 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=379c1a52a29701176cc45e9eef6fadd00d135de6;p=thirdparty%2Futil-linux.git fincore: fix multiplication overflow This failed on ppc64 with page size 64k. Signed-off-by: Ruediger Meier --- diff --git a/misc-utils/fincore.c b/misc-utils/fincore.c index b867c2d066..425f1bf425 100644 --- a/misc-utils/fincore.c +++ b/misc-utils/fincore.c @@ -188,7 +188,7 @@ static int fincore_fd (struct fincore_control *ctl, off_t file_size, off_t *count_incore) { - size_t window_size = N_PAGES_IN_WINDOW * ctl->pagesize; + size_t window_size = (size_t)N_PAGES_IN_WINDOW * ctl->pagesize; off_t file_offset; void *window = NULL; int rc = 0;