1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-19 18:26:32 +02:00

(process_file): Don't overflow for files of size >= 2^31

on systems with stat.st_blocks of a signed 32-bit type.
This bug causes trouble on some AIX 5.1 systems.
Report and trivial patch from Paul Townsend:
<http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
This commit is contained in:
Jim Meyering
2005-11-04 10:08:51 +00:00
parent cf18eb7ca4
commit 933576b440

View File

@@ -537,7 +537,7 @@ process_file (FTS *fts, FTSENT *ent)
duinfo_set (&dui,
(apparent_size
? sb->st_size
: ST_NBLOCKS (*sb) * ST_NBLOCKSIZE),
: (uintmax_t) ST_NBLOCKS (*sb) * ST_NBLOCKSIZE),
(time_type == time_mtime ? get_stat_mtime (sb)
: time_type == time_atime ? get_stat_atime (sb)
: get_stat_ctime (sb)));