]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Ignore ustar size when pax size is present (#2405)
authorTim Kientzle <kientzle@acm.org>
Wed, 6 Nov 2024 21:21:54 +0000 (13:21 -0800)
committerMartin Matuska <martin@matuska.de>
Tue, 19 Nov 2024 00:17:46 +0000 (01:17 +0100)
commiteddb9fcf93974f1ecca14fcfa4f67992f25bb790
treeffdee4c672a7919d038fe8e29f53f7f6bad45c2e
parentd06d679663507048b1d0893744b63fe9c3a9f242
Ignore ustar size when pax size is present (#2405)

When the pax `size` field is present, we should ignore the size value in
the ustar header. In particular, this fixes reading pax archives created
by GNU tar with entries larger than 8GB.

Note: This doesn't impact reading pax archives created by libarchive
because libarchive uses tar extensions to store an accurate large size
field in the ustar header. GNU tar instead strictly follows ustar in
this case, which prevents it from storing accurate sizes in the ustar
header.

Resolves #2404

(cherry picked from commit d60f3ea1b3bfd9f1dcd4040de9fca53fbedd829a)
Makefile.am
libarchive/archive_read_support_format_tar.c
libarchive/test/CMakeLists.txt
libarchive/test/test_compat_gtar_large.c [new file with mode: 0644]