]> git.ipfire.org Git - thirdparty/libarchive.git/commit
tar: Support negative time values with pax 2634/head
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sat, 24 May 2025 12:47:20 +0000 (14:47 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Sat, 24 May 2025 17:28:22 +0000 (19:28 +0200)
commita5d9c9a7cd6e1c5c0703ef22c8450c1a6dca7d12
treeaa354e089fae703b291626903ab2e8dcfedbdb90
parentcdc185e9177edcdc03bb5c1983d59874d434fb12
tar: Support negative time values with pax

Pax extended headers may specify negative time values for files older
than the epoch.

Adjust the code to clear values to 0.0 more often and set ps to
INT64_MIN to have a proper error specifier, because the parser does
not allow anything below -INT64_MAX.

Fixes https://github.com/libarchive/libarchive/issues/2562

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Makefile.am
libarchive/archive_read_support_format_tar.c
libarchive/test/CMakeLists.txt
libarchive/test/test_read_format_tar_pax_negative_time.c [new file with mode: 0644]
libarchive/test/test_read_format_tar_pax_negative_time.tar.uu [new file with mode: 0644]