]>
git.ipfire.org Git - thirdparty/libarchive.git/log
Rosen Penev [Tue, 1 Nov 2022 22:45:38 +0000 (15:45 -0700)]
cmake config ${} to @@
meson's cmake config file handling does not support mixing ${} and @@ in
the same file. Switch to @@ for consistency.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Martin Matuška [Wed, 19 Oct 2022 11:28:10 +0000 (13:28 +0200)]
Merge pull request #1784 from vtorri/vtorri_win10_2
cmake: set WINDOWS_VERSION to WIN10 by default
Vincent Torri [Sat, 1 Oct 2022 18:55:41 +0000 (20:55 +0200)]
cmake: set WINDOWS_VERSION to WIN10 by default
Tim Kientzle [Sat, 1 Oct 2022 16:53:23 +0000 (09:53 -0700)]
Merge pull request #1721 from wangkerong/master
libarchive:uninitialized value
Tim Kientzle [Sat, 1 Oct 2022 16:46:21 +0000 (09:46 -0700)]
Merge pull request #1777 from vtorri/vtorri_win10_1
cmake: update possible values of WINDOWS_VERSION to also support Windows 10
Tim Kientzle [Sat, 1 Oct 2022 16:42:16 +0000 (09:42 -0700)]
Merge pull request #1783 from vangyzen/issue1782
Support reading mtree files with tabs
Tim Kientzle [Sat, 1 Oct 2022 16:41:05 +0000 (09:41 -0700)]
Merge pull request #1781 from neheb/pkgconfigh
cmake: use pkgconfig for zstd lookup
Eric van Gyzen [Fri, 30 Sep 2022 15:28:09 +0000 (10:28 -0500)]
Support reading mtree files with tabs
Commit
45c5008c4 requires all characters in an mtree file to be
printable, as determined by `isprint()`. This broke support for
reading mtree files with tab characters, which are valid and otherwise
supported by libarchive. Allow them. Add a unit test.
Fixes #1782
Rosen Penev [Fri, 30 Sep 2022 08:51:08 +0000 (01:51 -0700)]
cmake: use pkgconfig for zstd lookup
As libzstd typically comes with a pkgconfig file, use it.
Fixes compilation at least on OpenWrt where host paths were leaking into
the build.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Vincent Torri [Tue, 20 Sep 2022 05:07:20 +0000 (07:07 +0200)]
cmake: update possible values of WINDOWS_VERSION to also support Windows 10
Martin Matuška [Mon, 5 Sep 2022 12:56:09 +0000 (14:56 +0200)]
Merge pull request #1736 from uckelman-sf/mingw_fixes
Fixes for running tests on Windows (or Wine)
Tim Kientzle [Fri, 5 Aug 2022 02:43:12 +0000 (19:43 -0700)]
Merge pull request #1761 from kraj/master
libarchive: Remove unneeded linux/fs.h include
Tim Kientzle [Fri, 5 Aug 2022 02:30:29 +0000 (19:30 -0700)]
Merge pull request #1745 from bobrofon/rar5-read_data_block
rar5: Fix random initial offset if using archive_read_data_into_fd
Tim Kientzle [Sun, 31 Jul 2022 16:06:34 +0000 (09:06 -0700)]
Merge pull request #1751 from yugr/hide-symbols
Hide internal symbols on platforms that support visibility annotations
Yuri Gribov [Wed, 27 Jul 2022 18:30:57 +0000 (21:30 +0300)]
Added missing file to CMakeLists.
Yuri Gribov [Sun, 3 Jul 2022 07:54:39 +0000 (10:54 +0300)]
Hide internal symbols on platforms that support visibility annotations (see discussion in gh-1017).
Khem Raj [Mon, 25 Jul 2022 17:56:53 +0000 (10:56 -0700)]
libarchive: Do not include sys/mount.h when linux/fs.h is present
These headers are in conflict and only one is needed by
archive_read_disk_posix.c therefore include linux/fs.h if it exists
otherwise include sys/mount.h
It also helps compiling with glibc 2.36
where sys/mount.h conflicts with linux/mount.h see [1]
[1] https://sourceware.org/glibc/wiki/Release/2.36
Tim Kientzle [Mon, 25 Jul 2022 00:29:23 +0000 (17:29 -0700)]
Merge pull request #1753 from bungeman/check_size_attribute
Validate entry_bytes_remaining in pax_attribute
Ben Wagner [Tue, 19 Jul 2022 17:02:40 +0000 (13:02 -0400)]
Validate entry_bytes_remaining in pax_attribute
The `size` attribute may contain a negative or too large value. Check
the range of the `entry_bytes_remaining` in `pax_attribute` the same way
as `header_common`. The test which is added passes both with and without
this change in a normal debug build. It is necessary to run with
`-fsanitize=undefined` to see that the undefined behavior is avoided.
Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=48467
Tim Kientzle [Sun, 24 Jul 2022 06:50:07 +0000 (23:50 -0700)]
Merge pull request #1759 from obiwac/fix-1754
libarchive: Handle a `calloc` returning NULL (fixes #1754)
obiwac [Fri, 22 Jul 2022 20:41:10 +0000 (22:41 +0200)]
libarchive: Handle a `calloc` returning NULL (fixes #1754)
Joel Uckelman [Thu, 30 Jun 2022 13:12:43 +0000 (14:12 +0100)]
Clean up the condition so we check EINVAL on Windows only.
Sergey Bobrenok [Sat, 25 Jun 2022 17:12:52 +0000 (20:12 +0300)]
rar5: Fix random initial offset if using archive_read_data_into_fd
archive_read_data_into_fd passes a pointer to an uninitialized
variable as an output 'offset' argument into archive_read_data_block
function, and expects that this variable will always be initialized
inside of it.
Like this:
size_t size;
int64_t offset;
archive_read_data_block(a, &buf, &size, &offset);
/* some work with offset here */
But rar5 implementation of archive_read_data_block function leaves the
'offset' argument uninitialized in one code path (if file is
compressed and there are no uncompressed pending data blocks).
As a result, archive_read_data_info_fd function is using an
uninitialized variable as an initial offset of an output file. And in
most cases it causes an appending sparse block of a random size at the
beginning of the output file.
Martin Matuška [Wed, 29 Jun 2022 08:41:30 +0000 (10:41 +0200)]
Merge pull request #1688 from hemnstill/zstd_windows
include zstd 1.5.2 on windows ci builds
Martin Matuška [Wed, 29 Jun 2022 08:41:03 +0000 (10:41 +0200)]
Merge pull request #1744 from seanm/snprintf
Fixed issue #1743: Changed sprintf to safer snprintf
Sean McBride [Wed, 22 Jun 2022 16:22:42 +0000 (12:22 -0400)]
Fixed issue #1743: Changed sprintf to safer snprintf
Also changed a few vsprintf to vsnprintf.
Most cases were trivial, one private function was changed to take the buffer length, one case required some fancy arithmetic.
Alexandr Reshetnikov [Sun, 19 Jun 2022 19:10:18 +0000 (23:10 +0400)]
Merge branch 'libarchive:master' into zstd_windows
Martin Matuška [Sun, 19 Jun 2022 06:36:18 +0000 (08:36 +0200)]
Merge pull request #1729 from bog-dan-ro/fix_comiple_android
Fix compile on Android
Martin Matuška [Sun, 19 Jun 2022 06:33:03 +0000 (08:33 +0200)]
Merge pull request #1732 from asuka-mio/master
Bionic c deprecates readdir_r too
Martin Matuška [Sun, 19 Jun 2022 06:27:38 +0000 (08:27 +0200)]
Merge pull request #1742 from emaste/master
CI: update FreeBSD versions
Alexandr Reshetnikov [Fri, 17 Jun 2022 16:21:33 +0000 (20:21 +0400)]
Merge branch 'libarchive:master' into zstd_windows
Ed Maste [Wed, 15 Jun 2022 17:01:05 +0000 (13:01 -0400)]
CI: update FreeBSD versions
Update to latest released versions (12.3 and 13.1), and drop now-EOL 11.4.
Tim Kientzle [Sun, 5 Jun 2022 23:45:04 +0000 (16:45 -0700)]
Merge pull request #1739 from janstary/width
fix Bl -width
Jan Starý [Sun, 5 Jun 2022 21:02:05 +0000 (23:02 +0200)]
fix Bl -width
Zack Weger [Fri, 12 Oct 2018 15:36:44 +0000 (11:36 -0400)]
Skip match_time tests when running on Windows, since the ctime can't be set
Zack Weger [Mon, 8 Oct 2018 15:17:10 +0000 (11:17 -0400)]
Files with invalid names don't exist, so don't set an error
Martin Matuška [Sun, 29 May 2022 07:35:22 +0000 (09:35 +0200)]
Merge pull request #1724 from elieux-contrib/wincrypto-sha256-384-512-fix
archive_digest: Use correct providers with Windows Crypto
Martin Matuška [Sun, 29 May 2022 07:33:28 +0000 (09:33 +0200)]
Merge pull request #1730 from gportay/fix-documentation
archive_write_open.3, archive_read_open.3: ends
tarsin [Sat, 21 May 2022 12:44:30 +0000 (20:44 +0800)]
Bionic c deprecates readdir_r too
* See https://android.googlesource.com/platform/bionic/+/
f19af37b5ee6cd5283683195d692fe3f713db2a5
BogDan Vatra [Tue, 3 May 2022 10:16:07 +0000 (13:16 +0300)]
Fix compile on Android
Fixes: #890
Gaël PORTAY [Thu, 12 May 2022 08:00:38 +0000 (10:00 +0200)]
archive_write_open.3, archive_read_open.3: ends
Reshetnikov Alexandr [Thu, 28 Apr 2022 19:35:05 +0000 (23:35 +0400)]
Merge remote-tracking branch 'remotes/origin/master' into zstd_windows
David Macek [Sun, 17 Apr 2022 17:52:25 +0000 (19:52 +0200)]
archive_digest: Use correct providers with Windows Crypto
Trying to use SHA256, SHA384 or SHA512 with mtree when linked against
Windows Crypto would result in silent failure. The call to
`CryptCreateHash` would fail with 0x80090008. The docs[1] say that
these algorithms require a different crypto provider, so let's make
that a parameter for `win_crypto_init` and choose at the call site along
with the algorithm.
[1] https://docs.microsoft.com/en-us/windows/win32/seccrypto/alg-id
Signed-off-by: David Macek <david.macek.0@gmail.com>
Martin Matuška [Sat, 16 Apr 2022 11:05:02 +0000 (13:05 +0200)]
Merge pull request #1723 from Biswa96/win32-static-openssl
autotools: Fix static linking when openssl is enabled in windows
Biswapriyo Nath [Wed, 13 Apr 2022 04:18:44 +0000 (09:48 +0530)]
autotools: Fix static linking when openssl is enabled in windows
This adds Requires.private field in pkgconfig file. Using that field,
pkgconfig pulls all the private cflags or libs while static linking.
OpenSSL static libraries require some windows system libraies. Otherwise
static liking fails with libarchive.
Reshetnikov Alexandr [Tue, 12 Apr 2022 09:48:51 +0000 (13:48 +0400)]
Merge remote-tracking branch 'remotes/origin/master' into zstd_windows
# Conflicts:
# build/ci/github_actions/ci.cmd
Martin Matuška [Mon, 11 Apr 2022 14:27:45 +0000 (16:27 +0200)]
Merge pull request #1714 from Biswa96/win32-openssl
Revert "Fix check for openssl on Windows"
Martin Matuška [Mon, 11 Apr 2022 14:26:25 +0000 (16:26 +0200)]
Merge pull request #1720 from eworm-de/markdown
README: fix markdown syntax
wangkerong [Sat, 9 Apr 2022 07:08:03 +0000 (15:08 +0800)]
libarchive:uninitialized value
Uninitialized variable crash error in oss_fuzz memory type test
Biswapriyo Nath [Sun, 3 Apr 2022 08:54:04 +0000 (14:24 +0530)]
Revert "Fix check for openssl on Windows"
This reverts commit
045e5c5a4460020e513516a5d1f3087094e67da3
For Windows platform, openssl 1.0.2 and earlier versions have
eay64 and eay32 libraries[1]. But from openssl 1.1.0 and above
versions have same library name[2] (libcrypto and libssl) like
other unix-like platforms.
[1]: https://wiki.openssl.org/index.php/Compilation_and_Installation#OpenSSL_1.0.2
[2]: https://wiki.openssl.org/index.php/Compilation_and_Installation#OpenSSL_1.1.0
Christian Hesse [Fri, 8 Apr 2022 19:52:05 +0000 (21:52 +0200)]
README: fix markdown syntax
Some markdown implementations (python-markdown) require an empty line
before lists, so just add these.
Martin Matuska [Fri, 8 Apr 2022 12:47:05 +0000 (14:47 +0200)]
Libarchive 3.6.2dev
Martin Matuska [Fri, 8 Apr 2022 11:13:17 +0000 (13:13 +0200)]
CI: Update dependencies for Windows build
Upgrade zlib to 1.2.12
Upgrade bzip2 to
10fe37f2e
Martin Matuska [Fri, 8 Apr 2022 10:05:45 +0000 (12:05 +0200)]
Release 3.6.1
Martin Matuška [Wed, 6 Apr 2022 23:28:08 +0000 (01:28 +0200)]
Merge pull request #1717 from evelikov/ssl
archive_digest: check return value of EVP_DigestInit()
Emil Velikov [Tue, 5 Apr 2022 10:36:02 +0000 (11:36 +0100)]
archive_digest: check return value of EVP_DigestInit()
The function returns 0 on error, which is seemingly very common with
OpenSSL 3.0 and rmd160.
Just error check the lot, so we don't get even more random failures with
future releases of OpenSSL.
Fixes #1549
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Martin Matuska [Sun, 3 Apr 2022 10:06:24 +0000 (12:06 +0200)]
RAR reader: fix heap-use-after-free in run_filters()
OSS-Fuzz issue 46279
Fixes #1715
Reshetnikov Alexandr [Thu, 31 Mar 2022 19:15:03 +0000 (23:15 +0400)]
include zstd 1.5.2 on windows builds
Martin Matuska [Wed, 30 Mar 2022 19:14:00 +0000 (21:14 +0200)]
ISO reader: fix possible heap buffer overflow in read_children()
OSS-Fuzz issue: 38764
Fixes #1685
Tim Kientzle [Thu, 24 Mar 2022 09:35:00 +0000 (10:35 +0100)]
ZIP reader: fix possible out-of-bounds read in zipx_lzma_alone_init()
Fixes #1672
Martin Matuška [Sat, 12 Mar 2022 09:19:16 +0000 (10:19 +0100)]
Merge pull request #1679 from michael-o/hp-ux-dirfd
Add macro for dirfd() on HP-UX because no full POSIX.1-2008 coverage …
Michael Osipov [Thu, 10 Mar 2022 11:56:02 +0000 (12:56 +0100)]
Add macro for dirfd() on HP-UX because no full POSIX.1-2008 coverage exists
HP-UX does neither provide a function nor a macro. This solution based on an
issue with vim: https://github.com/vim/vim/issues/6838
Martin Matuska [Thu, 10 Mar 2022 10:00:26 +0000 (11:00 +0100)]
build: fix detection of readdir_r() and dirfd() in configure.ac
Fixes #1537
Tim Kientzle [Sat, 5 Mar 2022 17:45:01 +0000 (09:45 -0800)]
Merge pull request #1676 from ken-matsui/patch-2
Remove the unused variable `detected_bytes`
Ken Matsui [Sat, 5 Mar 2022 03:12:09 +0000 (12:12 +0900)]
Remove the unused variable `detected_bytes`
Tim Kientzle [Fri, 4 Mar 2022 05:15:53 +0000 (21:15 -0800)]
Merge pull request #1674 from 0mp/patch-1
Fix use of At mdoc(7) macro
Mateusz Piotrowski [Thu, 3 Mar 2022 23:01:40 +0000 (00:01 +0100)]
Fix use of At mdoc(7) macro
Martin Matuska [Sat, 19 Feb 2022 19:43:22 +0000 (20:43 +0100)]
RAR reader: fix null-dereference in RAR (v4) filter code
Add safety check to run_filters() and fix return codes
Reported-by: OSS-Fuzz #44843
Martin Matuska [Fri, 18 Feb 2022 23:38:53 +0000 (00:38 +0100)]
7zip reader: style fixes after
3962d596d
Martin Matuška [Fri, 18 Feb 2022 23:36:52 +0000 (00:36 +0100)]
Merge pull request #1670 from bradking/include-platform-first
windows: include archive_platform.h first in blake2s sources
Martin Matuška [Fri, 18 Feb 2022 23:36:32 +0000 (00:36 +0100)]
Merge pull request #1668 from mgorny/missing-zlib
Fix some test failures when building --without-zlib
Martin Matuška [Fri, 18 Feb 2022 23:35:44 +0000 (00:35 +0100)]
Merge pull request #1671 from cielavenir/fix7zPPMDReadBeyondBoundary
Fix 7z PPMD reading beyond boundary
cielavenir [Fri, 18 Feb 2022 15:23:16 +0000 (00:23 +0900)]
code review
cielavenir [Fri, 18 Feb 2022 09:19:12 +0000 (18:19 +0900)]
Fix 7z PPMD reading beyond boundary
Martin Matuska [Thu, 17 Feb 2022 16:09:00 +0000 (17:09 +0100)]
ci (GitHub Actions): build on Windows 2022 and use Visual Studio 17 2022
Martin Matuska [Wed, 16 Feb 2022 20:36:41 +0000 (21:36 +0100)]
RAR reader: fix heap-use-after-free in RAR (v4) filter code
Rework function expand() to process integer passed by reference
and return an archive error code.
Fixes: 01a2d329dfc7 (support rar filters)
Reported-by: OSS-Fuzz #44547
Brad King [Wed, 16 Feb 2022 12:31:56 +0000 (07:31 -0500)]
windows: include archive_platform.h first in blake2s sources
Move the inclusion added by commit
90978db1 (windows: make sure we use
the right calling convention for libc, 2021-10-13, v3.6.0~39^2~1) to be
first. This is our convention in all other `.c` sources. It ensures
that our configured `_WIN32_WINNT` value is defined before including any
system headers.
Martin Matuska [Mon, 14 Feb 2022 00:08:46 +0000 (01:08 +0100)]
tests: reduce sample size for RAR filter test
Martin Matuska [Mon, 14 Feb 2022 00:13:03 +0000 (01:13 +0100)]
Libarchive 3.6.1dev
Michał Górny [Sat, 12 Feb 2022 10:12:27 +0000 (11:12 +0100)]
Handle missing zlib in test_read_format_zip_7z_deflate
Michał Górny [Sat, 12 Feb 2022 10:11:22 +0000 (11:11 +0100)]
Fix expected error messages in test_read_format_zip_winzip_aes*
Fix expected error messages when libarchive is compiled --without-zlib,
in order to fix test failures.
Martin Matuska [Wed, 9 Feb 2022 08:41:14 +0000 (09:41 +0100)]
Release 3.6.0
Martin Matuška [Wed, 9 Feb 2022 07:35:52 +0000 (08:35 +0100)]
Merge pull request #1665 from juikim/master
bsdtar(1): Document threads options for zstd and xz
Jung-uk Kim [Wed, 9 Feb 2022 03:03:05 +0000 (22:03 -0500)]
bsdtar(1): Document threads options for zstd and xz
Martin Matuska [Tue, 8 Feb 2022 09:47:31 +0000 (10:47 +0100)]
Libarchive 3.6.0dev
Martin Matuska [Tue, 8 Feb 2022 08:23:37 +0000 (09:23 +0100)]
CI: add dist-artifact
Martin Matuska [Tue, 8 Feb 2022 07:27:11 +0000 (08:27 +0100)]
tests: fix style in test_utils/test_main.c
Martin Matuška [Tue, 8 Feb 2022 07:25:55 +0000 (08:25 +0100)]
Merge pull request #1657 from kientzle/ReorganizeTestCode
Reorganize test code a bit
Martin Matuška [Tue, 8 Feb 2022 07:25:23 +0000 (08:25 +0100)]
Merge pull request #1664 from juikim/master
Enable LZMA support for FreeBSD
Martin Matuška [Tue, 8 Feb 2022 07:16:45 +0000 (08:16 +0100)]
Merge pull request #1493 from antekone/rar5_ossfuzz_30459
RAR5 reader: add more checks for invalid extraction parameters
Grzegorz Antoniak [Sat, 13 Feb 2021 09:13:22 +0000 (10:13 +0100)]
RAR5 reader: add more checks for invalid extraction parameters
Some specially crafted files declare invalid extraction parameters that
can confuse the RAR5 reader.
One of the arguments is the declared window size parameter that the
archive file can declare for each file stored in the archive. Some
crafted files declare window size equal to 0, which is clearly wrong.
This commit adds additional safety checks decreasing the tolerance of
the RAR5 format.
This commit also contains OSSFuzz sample #30459.
Jung-uk Kim [Mon, 7 Feb 2022 21:16:34 +0000 (16:16 -0500)]
Enable LZMA support for FreeBSD
All supported FreeBSD releases have LZMA by default.
Martin Matuška [Mon, 7 Feb 2022 19:59:23 +0000 (20:59 +0100)]
Merge pull request #1663 from yelkarama/master
Fix typo in libarchive/archive_read_support_filter_lzop.c
Younes El-karama [Mon, 7 Feb 2022 16:30:40 +0000 (11:30 -0500)]
Fix typo in libarchive/archive_read_support_filter_lzop.c
Extra "dot" in line 176 of libarchive/archive_read_support_filter_lzop.c
Martin Matuska [Mon, 7 Feb 2022 09:48:51 +0000 (10:48 +0100)]
untar.c: style fixes
Martin Matuska [Mon, 7 Feb 2022 08:23:41 +0000 (09:23 +0100)]
tar: fix format name typo in creation_set.c
Closes #1659
Martin Matuška [Sun, 6 Feb 2022 23:59:09 +0000 (00:59 +0100)]
Merge pull request #1170 from kidandcat/patch-1
Windows support for contrib/untar
Jairo [Sun, 6 Feb 2022 23:13:18 +0000 (00:13 +0100)]
Update untar.c
Jairo [Sun, 6 Feb 2022 23:11:02 +0000 (00:11 +0100)]
Update untar.c
Martin Matuška [Sun, 6 Feb 2022 18:35:30 +0000 (19:35 +0100)]
Merge pull request #1491 from antekone/rar5_ossfuzz_30442
RAR5 reader: fix invalid memory access in some files