From 4a5ca363b523fb32acc91abff0cc08e7b126f325 Mon Sep 17 00:00:00 2001 From: Thomas Cort Date: Mon, 6 Jun 2011 14:31:20 +0000 Subject: [PATCH] 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. --- lib/libarchive/archive_write_set_format_ustar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. */ -- 2.44.0