From: Thomas Cort Date: Mon, 6 Jun 2011 14:31:20 +0000 (+0000) Subject: libarchive: fix bad timestamp bug caused by bit shift. X-Git-Tag: v3.2.0~550 X-Git-Url: http://zhaoyanbai.com/repos/doc/mandoc_char.7.html?a=commitdiff_plain;h=4a5ca363b523fb32acc91abff0cc08e7b126f325;p=minix.git libarchive: fix bad timestamp bug caused by bit shift. The file timestamps in archives created by libarchive all had dates in the year 2038. It was caused by a bit shift in archive_write_set_format_ustar which shifted 1 instead of 1ull. --- diff --git a/lib/libarchive/archive_write_set_format_ustar.c b/lib/libarchive/archive_write_set_format_ustar.c index fca745d25..7a3a73de3 100644 --- a/lib/libarchive/archive_write_set_format_ustar.c +++ b/lib/libarchive/archive_write_set_format_ustar.c @@ -502,7 +502,7 @@ format_number(int32_t v, char *p, int s, int maxsize, int strict) #if !defined(__LONG_LONG_SUPPORTED) limit = lshift64(cvu64(1), s*3); #else - limit = (1 << (s*3)); + limit = (1ull << (s*3)); #endif /* "Strict" only permits octal values with proper termination. */