]> granicus.if.org Git - strace/commit
Fix stat64 st_[acm]time decoding for personalities with 32-bit time_t
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 12 Mar 2015 16:59:01 +0000 (16:59 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 16 Mar 2015 14:23:09 +0000 (14:23 +0000)
commitbce1ff5f881c3fe7b921637af2ee06dd0cdceef4
tree8fcd5b31784abdc442143ef52d6384b1f5b014bd
parent499c5aad0c2a4204ce28bd7761cabe9ceba57bec
Fix stat64 st_[acm]time decoding for personalities with 32-bit time_t

STRUCT_STAT.st_[acm]time are declared as unsigned int for some
personalities, while time_t is signed.

* printstat.h (DO_PRINTSTAT): If st_[acm]time have the same size as int,
explicitly cast them to int.
* tests/stat64-v.test: Test that negative time_t is decoded properly.

Reported-by: Andreas Schwab <schwab@suse.de>
printstat.h
tests/stat64-v.test