]>
git.ipfire.org Git - thirdparty/libarchive.git/log
Martin Matuska [Tue, 19 May 2020 23:48:25 +0000 (01:48 +0200)]
Libarchive 3.4.3
Martin Matuška [Tue, 19 May 2020 08:20:51 +0000 (10:20 +0200)]
Merge pull request #1378 from stefan-baranoff/issue-1377-passphrase-memory-leak
Fix memory leak from passphrase callback
Stefan Baranoff [Tue, 19 May 2020 00:57:14 +0000 (00:57 +0000)]
Fix memory leak from passphrase callback
There is a bug in the linked list implementation for passphrases. The insert to
head function does not account for the tail==head case and causes a leak. The
first entry into the list is lost when the second entry is added. The second
and beyond entries are are released properly, but the first is lost entirely.
Martin Matuška [Fri, 8 May 2020 21:19:51 +0000 (23:19 +0200)]
Merge pull request #1376 from AdamKorcz/master
Moved oss-fuzz files from oss-fuzz to Libarchives repository
Adam Korczynski [Wed, 6 May 2020 11:35:59 +0000 (12:35 +0100)]
Moved oss-fuzz files from oss-fuzz to Libarchives repository
Martin Matuska [Thu, 30 Apr 2020 17:28:04 +0000 (19:28 +0200)]
Add test for #1357 (detection of pzstd compressed files)
Martin Matuška [Thu, 30 Apr 2020 17:22:26 +0000 (19:22 +0200)]
Merge pull request #1357 from mako2580/master
zstd: Add support for files created with pzstd
Martin Matuška [Thu, 30 Apr 2020 08:03:10 +0000 (10:03 +0200)]
Merge pull request #1360 from EricAustinYu/master
Remove unreachable code in RAR reader
Martin Matuska [Thu, 30 Apr 2020 01:46:05 +0000 (03:46 +0200)]
Fix retrieving incorrect member from struct statfs
Fixes #1355
Martin Matuska [Thu, 16 Apr 2020 02:10:30 +0000 (04:10 +0200)]
tar reader: update handling of RHT.security.selinux xattr
Add test for PR #1348
Rename test_read_pax_schily_xattr to test_read_pax_xattr_schily
Martin Matuška [Thu, 30 Apr 2020 01:39:48 +0000 (03:39 +0200)]
Merge pull request #1372 from evelikov/single-child
Cleanup child handling
Martin Matuška [Thu, 30 Apr 2020 01:35:03 +0000 (03:35 +0200)]
Merge pull request #1371 from evelikov/digest-ifdef
Remove #ifdef chain in __archive_digest init
Martin Matuška [Thu, 30 Apr 2020 01:31:42 +0000 (03:31 +0200)]
Merge pull request #1365 from AdamKorcz/master
Added seed corpus
Terrell Russell [Sun, 26 Apr 2020 00:50:23 +0000 (20:50 -0400)]
fix typo in README.md (#1373)
Emil Velikov [Sat, 25 Apr 2020 14:46:41 +0000 (15:46 +0100)]
Remove CloseHandle() from __archive_write_program_free
The call to CloseHandle() is asymmetric and wrong.
The handle is created during the __achive_create_child() call in
__archive_write_program_open() aka the filter open callback.
While CloseHandle() is already called in the filter close callback aka
__archive_write_program_close().
Remove the incorrect call to CloseHandle() from the bidder free callback
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 25 Apr 2020 14:42:45 +0000 (15:42 +0100)]
Call OpenProcess() from within __archive_create_child()
Move the Windows specific to the Windows version of the helper, making
the existing code shorter and simpler.
This means that the child "handle" type will vary across the two
platforms - something that we've already been doing with waitpid.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Emil Velikov [Sat, 25 Apr 2020 12:56:12 +0000 (13:56 +0100)]
Change __archive_create_child() signature
Change the function to return an int - ARCHIVE_OK or ARCHIVE_FAILED,
taking the child as an output argument.
This will allow us to simplify the existing code and have move platform
specifics in the platform files - posix and windows
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Adam Korczynski [Sat, 25 Apr 2020 16:19:29 +0000 (17:19 +0100)]
Moved the corpus file to the contrib dir
Emil Velikov [Sat, 14 Mar 2020 13:31:31 +0000 (13:31 +0000)]
Remove #ifdef chain in __archive_digest init
Follow the approach set by the crypto and use the exact same name for
the respective functions. This is perfectly fine, since only one
provider can be used (built) at given time.
As a result, we can kill off the excessively long ifdef chain, making
the more more manageable and shorter.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Martin Matuška [Fri, 24 Apr 2020 01:47:42 +0000 (03:47 +0200)]
Merge pull request #1363 from aseprite/dont-test-lzma-if-not-needed
Don't even try HAVE_LZMA_STREAM_ENCODER_MT if ENABLE_LZMA is disabled
Martin Matuška [Fri, 24 Apr 2020 01:47:05 +0000 (03:47 +0200)]
Merge pull request #1364 from aseprite/macos-no-deprecated
Disable error using deprecated functions on macOS 10.15 to calculate MD5
Martin Matuška [Fri, 24 Apr 2020 01:45:39 +0000 (03:45 +0200)]
Merge pull request #1362 from aseprite/libarchive.pc-in-binary-dir
Create libarchive.pc inside the cmake build dir
Martin Matuška [Fri, 24 Apr 2020 01:44:45 +0000 (03:44 +0200)]
Merge pull request #1361 from aseprite/fix-msvc-warning-flags
Use /w1nnnn instead of /wennnn to enable warnings on MSVC Debug mode
Martin Matuška [Fri, 24 Apr 2020 01:43:16 +0000 (03:43 +0200)]
Merge pull request #1367 from zoulasc/master
Fix issues in acl tests
Christos Zoulas [Wed, 22 Apr 2020 15:00:26 +0000 (11:00 -0400)]
Make variable const since it is assigned from a string literal
Christos Zoulas [Wed, 22 Apr 2020 15:00:13 +0000 (11:00 -0400)]
Add missing breaks
Adam Korczynski [Tue, 21 Apr 2020 17:23:53 +0000 (18:23 +0100)]
Added seed corpus
David Capello [Sat, 18 Apr 2020 18:09:43 +0000 (15:09 -0300)]
Use /w1nnnn instead of /wennnn to enable warnings on MSVC Debug mode
On MSVC /wennnn treats the specific warning number nnnn as an error:
https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level
But we want to enable this only when ENABLE_WERROR is defined (so the
general /WX flag is enough to treat all warnings as errors instead of
using /we).
David Capello [Thu, 10 Oct 2019 23:34:52 +0000 (20:34 -0300)]
Disable error using deprecated functions on macOS 10.15 to calculate MD5
David Capello [Sat, 24 Jun 2017 16:35:57 +0000 (13:35 -0300)]
Don't even try HAVE_LZMA_STREAM_ENCODER_MT if ENABLE_LZMA is disabled
David Capello [Wed, 14 Jun 2017 23:19:20 +0000 (20:19 -0300)]
Create libarchive.pc inside the cmake build dir
In case that we don't have write access in the source dir, we have to
write generated files in the build dir.
Martin Matuška [Thu, 16 Apr 2020 00:20:24 +0000 (02:20 +0200)]
Merge pull request #1348 from mikhailnov/rh-selinux
Support RHT.security.selinux from GNU tar
Martin Matuška [Thu, 16 Apr 2020 00:07:23 +0000 (02:07 +0200)]
Merge pull request #1359 from hjmallon/pr.neg_zstd_2
zstd: Improve version checking
Eric Yu [Tue, 14 Apr 2020 16:22:54 +0000 (11:22 -0500)]
Remove unreachable code in RAR reader
Harry Mallon [Tue, 14 Apr 2020 13:37:28 +0000 (14:37 +0100)]
zstd: Improve version checking
Martin Matuška [Fri, 10 Apr 2020 00:50:53 +0000 (02:50 +0200)]
Merge pull request #1352 from hjmallon/pr.negative_zstd
zstd: Support negative compression-levels
Martin Matuška [Fri, 10 Apr 2020 00:48:24 +0000 (02:48 +0200)]
Merge pull request #1356 from robUx4/svfs-variable
Fix stavfs variable name
Matúš Olekšák [Wed, 8 Apr 2020 18:48:16 +0000 (20:48 +0200)]
zstd: Add support for files created with pzstd
Harry Mallon [Wed, 11 Mar 2020 12:47:49 +0000 (12:47 +0000)]
zstd: Support negative compression-levels
Steve Lhomme [Mon, 6 Apr 2020 06:19:44 +0000 (08:19 +0200)]
consistently use svfs for statvfs variables
So it cannot be misinterpreted as a statfs which uses the sfs variable name.
Martin Matuška [Fri, 3 Apr 2020 21:32:04 +0000 (23:32 +0200)]
Merge pull request #1354 from robUx4/local-mode_t-fix
archive_entry: use the proper define for mode_t
Steve Lhomme [Fri, 27 Mar 2020 15:26:07 +0000 (16:26 +0100)]
archive_entry: use the proper define for mode_t
This is the define set in archive_entry.h to use the right mode_t type per
platform. "mode_t" may not be available at all.
This is also how these functions are declared in archive_entry.h
Martin Matuška [Sat, 28 Mar 2020 07:49:04 +0000 (08:49 +0100)]
Merge pull request #1350 from josch/master
libarchive/archive_entry_stat.3: typo nlinks -> nlink
Martin Matuška [Sat, 28 Mar 2020 07:45:36 +0000 (08:45 +0100)]
Merge pull request #1342 from hjmallon/pr.fix_high_zstd
Fixes for using zstd binary
Martin Matuska [Sat, 28 Mar 2020 07:23:28 +0000 (08:23 +0100)]
CI: build Windows version with xz 5.2.5
Johannes 'josch' Schauer [Mon, 23 Mar 2020 10:21:55 +0000 (11:21 +0100)]
libarchive/archive_entry_stat.3: typo nlinks -> nlink
Mikhail Novosyolov [Thu, 19 Mar 2020 22:13:23 +0000 (01:13 +0300)]
Support RHT.security.selinux from GNU tar
Harry Mallon [Wed, 11 Mar 2020 12:14:36 +0000 (12:14 +0000)]
zstd: Fix support for compression-level>=20 when using binary
* Requires '--ultra' argument
Harry Mallon [Wed, 11 Mar 2020 12:06:51 +0000 (12:06 +0000)]
zstd: Use --no-check with binary to match library default
Martin Matuska [Mon, 2 Mar 2020 07:55:44 +0000 (08:55 +0100)]
Safe writes: improve error handling
Print message if creation of temporary file fails.
When rename of temporary file fails, exit with ARCHIVE_FAILED.
Reword message on failed rename.
Revert
d84ec3f and
85b9f66 , call archive_set_error()w before unlinking.
Martin Matuska [Mon, 2 Mar 2020 01:58:57 +0000 (02:58 +0100)]
Add archive_write_disk_windows.c counterpart to previous commit
Martin Matuska [Mon, 2 Mar 2020 01:45:50 +0000 (02:45 +0100)]
Store errno when unlinking after rename on safe write failed
Martin Matuska [Mon, 2 Mar 2020 01:40:10 +0000 (02:40 +0100)]
cpio/cpio.c: Fix off-by-one in previous commit
Martin Matuska [Sun, 1 Mar 2020 23:48:47 +0000 (00:48 +0100)]
cpio/cpio.c: avoid calling strlen() for destdir twice
Martin Matuska [Sat, 29 Feb 2020 01:10:00 +0000 (02:10 +0100)]
Safe writes: delete temporary file if rename fails
Change error message to "Failed to safe write"
Fixes #1341
Martin Matuska [Fri, 28 Feb 2020 10:37:55 +0000 (11:37 +0100)]
CI: GitHub Actions: use C:\windows\system32\tar.exe as tar on Windows
Martin Matuska [Thu, 27 Feb 2020 09:42:27 +0000 (10:42 +0100)]
bsdcpio_test: from_hex() needs to be an uint32_t
Fixes #1339
Martin Matuska [Thu, 27 Feb 2020 00:54:19 +0000 (01:54 +0100)]
XAR reader: initialize file_queue with 0 and memcpy() if allocated only
Fixes #1338
Martin Matuska [Tue, 25 Feb 2020 23:09:27 +0000 (00:09 +0100)]
CI: use static CMake build of liblzma
Martin Matuska [Mon, 24 Feb 2020 22:30:20 +0000 (23:30 +0100)]
CI: various adjustments
Always bootstrap pkg on FreeBSD
Remove unnecessary dependency on libzip-dev
Remove Cirrus CI Fedora builds for now
Kamil Rytarowski [Mon, 24 Feb 2020 21:58:00 +0000 (22:58 +0100)]
archive_read.c: silence UBSan warning about undefined behavior
Fixes #1335
Martin Matuška [Sun, 23 Feb 2020 22:02:10 +0000 (23:02 +0100)]
Merge pull request #1331 from cure/patch-1
New ASCII format: fix hard link description
Ward Vandewege [Fri, 14 Feb 2020 02:56:09 +0000 (21:56 -0500)]
New ASCII format: fix hard link description
The description of how hard links are handled in the 'new ASCII format' is wrong. Cpio stores the *first*, not *last* copy of the file with its entire contents, followed by entries with filesize set to zero for each subsequent entry that is hard linked. While creating the archive, how would it ever know it was processing the last one!
Martin Matuska [Thu, 13 Feb 2020 00:23:08 +0000 (01:23 +0100)]
XAR writer: initialize size with 0 in xar_write_data()
Martin Matuska [Thu, 13 Feb 2020 00:20:18 +0000 (01:20 +0100)]
Solve warning by excluding more code to _WIN32 in file_open()
Martin Matuska [Wed, 12 Feb 2020 23:45:16 +0000 (00:45 +0100)]
Add testcase for ZIPX files with LZMA_STREAM_END marker
Testcase for issue #1257 (PR #1297)
Martin Matuska [Wed, 12 Feb 2020 13:38:45 +0000 (14:38 +0100)]
CI: add external binary static xz to Windows build
Martin Matuska [Wed, 12 Feb 2020 00:11:18 +0000 (01:11 +0100)]
Constify name in __archive_write_entry_filetype_unsupported()
Martin Matuska [Tue, 11 Feb 2020 23:09:00 +0000 (00:09 +0100)]
Libarchive 3.4.3dev
Martin Matuska [Tue, 11 Feb 2020 21:49:11 +0000 (22:49 +0100)]
Libarchive 3.4.2
Martin Matuska [Tue, 11 Feb 2020 17:40:54 +0000 (18:40 +0100)]
Add script to generate release files with Docker.
Martin Matuska [Tue, 11 Feb 2020 17:34:45 +0000 (18:34 +0100)]
Unlink before creating a hardlink on Windows
when using ARCHIVE_EXTRACT_SAFE_WRITES.
Completes #1330 for Windows.
Martin Matuška [Tue, 11 Feb 2020 17:24:37 +0000 (18:24 +0100)]
Merge pull request #1330 from zoulasc/master
Fix ARCHIVE_EXTRACT_SAFE_WRITES for existing symlinks
zoulasc [Tue, 11 Feb 2020 00:43:32 +0000 (19:43 -0500)]
Just like the hard link case, for symlinks we need to remove first
for ARCHIVE_EXTRACT_SAFE_WRITES.
Martin Matuska [Mon, 10 Feb 2020 13:46:15 +0000 (14:46 +0100)]
Update NEWS
Martin Matuska [Mon, 10 Feb 2020 13:26:17 +0000 (14:26 +0100)]
RAR5 reader: use %zu to sprintf() size_t
Martin Matuska [Sun, 9 Feb 2020 07:15:58 +0000 (08:15 +0100)]
CI Windows: download zlib and bzip2 from cloned repositories
Martin Matuska [Sat, 8 Feb 2020 22:02:53 +0000 (23:02 +0100)]
CI: generate and publish build artifacts on GitHub actions
Fixes #1313
Martin Matuska [Fri, 7 Feb 2020 13:50:37 +0000 (14:50 +0100)]
CI: build and use bzip2 on Windows from GiLab repository
Use static versions of zlib and bzip2 on Windows.
Simplify ci.cmd for GitHub Actions.
Martin Matuška [Fri, 7 Feb 2020 13:16:58 +0000 (14:16 +0100)]
Merge pull request #1329 from bradking/string-append-wcs-overflow
Fix possible heap-buffer-overflow in archive_string_append_from_wcs on Windows
Martin Matuska [Thu, 6 Feb 2020 21:52:36 +0000 (22:52 +0100)]
RAR5 reader: do not mutate a global variable
Read RAR5 signature with a function instead.
Fixes #1303
Martin Matuska [Fri, 7 Feb 2020 09:45:15 +0000 (10:45 +0100)]
CI: exit with error on failure in Visual Studio stages
Martin Matuska [Thu, 6 Feb 2020 20:44:30 +0000 (21:44 +0100)]
7z reader: support Delta filter with values 2-256
Fixes #987
Brad King [Thu, 6 Feb 2020 19:28:02 +0000 (14:28 -0500)]
Fix possible heap-buffer-overflow in archive_string_append_from_wcs on Windows
Fix `archive_string_append_from_wcs_in_codepage` to account for the
already-used portion of the buffer when computing the size of the
remaining buffer for `WideCharToMultiByte` output.
Martin Matuška [Sun, 2 Feb 2020 21:48:34 +0000 (22:48 +0100)]
Merge pull request #1326 from antekone/rar5_ossfuzz_20459
RAR5 reader: reject files that declare invalid header flags
Grzegorz Antoniak [Sun, 2 Feb 2020 07:04:41 +0000 (08:04 +0100)]
RAR5 reader: reject files that declare invalid header flags
One of the fields in RAR5's base block structure is the size of the
header. Some invalid files declare a 0 header size setting, which can
confuse the unpacker. Minimum header size for RAR5 base blocks is 7
bytes (4 bytes for CRC, and 3 bytes for the rest), so block size of 0
bytes should be rejected at header parsing stage.
The fix adds an error condition if header size of 0 bytes is detected.
In this case, the unpacker will not attempt to unpack the file, as the
header is corrupted.
The commit also adds OSSFuzz #20459 sample to test further regressions
in this area.
Martin Matuška [Sat, 1 Feb 2020 18:38:16 +0000 (19:38 +0100)]
Merge pull request #1324 from bradking/solaris-11.4
libarchive: Fix detection of 'major' on Solaris 11.4
Martin Matuska [Fri, 31 Jan 2020 23:58:03 +0000 (00:58 +0100)]
Fix use after free in ISO9660 and XAR writer
Remove rbtree nodes before freeing them.
For better code readability import new rbtree macros from NetBSD.
Fixes #1325
Martin Matuska [Thu, 30 Jan 2020 23:30:34 +0000 (00:30 +0100)]
Update filter and format options in manual pages.
The list of format and filter options in bsdtar(1) is incomplete.
Add reference to manual pages archive_write_set_options(3) and
archive_read_set_options(3) for a complete list of supported options.
Fixes #1323
Martin Matuska [Thu, 30 Jan 2020 23:29:35 +0000 (00:29 +0100)]
mtree reader: initialize checkfs with 0
Brad King [Thu, 30 Jan 2020 14:49:22 +0000 (09:49 -0500)]
libarchive: Fix detection of 'major' on Solaris 11.4
In `archive_pack_dev.c` there is code checking the `HAVE_MAJOR` macro,
but it is not computed. Port the equivalent logic from
`archive_entry.c` to define the macro.
Martin Matuska [Mon, 27 Jan 2020 23:25:53 +0000 (00:25 +0100)]
Cmake MSVC: replace warning C4061 with C4062
Fixes #1322
Martin Matuska [Sun, 26 Jan 2020 00:20:36 +0000 (01:20 +0100)]
test_write_format_xar: add "none" options to test
Martin Matuska [Sun, 26 Jan 2020 00:01:25 +0000 (01:01 +0100)]
PAX writer: fix return-on-error memory leaks in archive_write_pax_header()
Martin Matuska [Sat, 25 Jan 2020 23:35:50 +0000 (00:35 +0100)]
PAX writer: fix entry uname or gname longer than 32 characters
Fixes #1319
Martin Matuska [Sat, 25 Jan 2020 13:26:59 +0000 (14:26 +0100)]
Unify unsupported entry file type error message in writer
Closes #1320
Martin Matuska [Thu, 23 Jan 2020 15:13:19 +0000 (16:13 +0100)]
XAR writer: fix compression output buffer handling
Add "none" as acceptable value to xar:checksum and xar:toc-checksum
Document XAR options in bsdtar(1)
Fixes #1317
Martin Matuska [Wed, 22 Jan 2020 22:30:32 +0000 (23:30 +0100)]
CI: make mingw32-make verbose
zoulasc [Tue, 21 Jan 2020 18:34:18 +0000 (13:34 -0500)]
Add printf attributes to the printflike functions used in tests and fix
the format errors.
Closes #1318
Grzegorz Antoniak [Wed, 1 Jan 2020 06:29:34 +0000 (07:29 +0100)]
RAR5 reader: refactored parse_tables() a little bit
Some if/continue constructs could be changed to if/elseif/else blocks.
This allows elimination of superfluous 'continue' directives.
Closes #1280