diff --git a/lrzip.c b/lrzip.c index 1b10e80..0d7f87a 100644 --- a/lrzip.c +++ b/lrzip.c @@ -467,7 +467,7 @@ void decompress_file(rzip_control *control) * decompressed file. */ if (unlikely(fstatvfs(fd_out, &fbuf))) fatal("Failed to fstatvfs in decompress_file\n"); - free_space = fbuf.f_bsize * fbuf.f_bavail; + free_space = (i64)fbuf.f_bsize * (i64)fbuf.f_bavail; if (free_space < expected_size) { if (FORCE_REPLACE) print_err("Warning, inadequate free space detected, but attempting to decompress due to -f option being used.\n"); diff --git a/rzip.c b/rzip.c index 2ec758a..da65740 100644 --- a/rzip.c +++ b/rzip.c @@ -795,7 +795,7 @@ void rzip_fd(rzip_control *control, int fd_in, int fd_out) * uncompressed file. */ if (unlikely(fstatvfs(fd_out, &fbuf))) fatal("Failed to fstatvfs in compress_file\n"); - free_space = fbuf.f_bsize * fbuf.f_bavail; + free_space = (i64)fbuf.f_bsize * (i64)fbuf.f_bavail; if (free_space < control->st_size) { if (FORCE_REPLACE) print_err("Warning, possibly inadequate free space detected, but attempting to compress due to -f option being used.\n");