]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
3 years agoLibarchive 3.4.3 v3.4.3
Martin Matuska [Tue, 19 May 2020 23:48:25 +0000 (01:48 +0200)] 
Libarchive 3.4.3

3 years agoMerge pull request #1378 from stefan-baranoff/issue-1377-passphrase-memory-leak
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

3 years agoFix memory leak from passphrase callback 1378/head
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.

3 years agoMerge pull request #1376 from AdamKorcz/master
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

3 years agoMoved oss-fuzz files from oss-fuzz to Libarchives repository 1376/head
Adam Korczynski [Wed, 6 May 2020 11:35:59 +0000 (12:35 +0100)] 
Moved oss-fuzz files from oss-fuzz to Libarchives repository

4 years agoAdd test for #1357 (detection of pzstd compressed files)
Martin Matuska [Thu, 30 Apr 2020 17:28:04 +0000 (19:28 +0200)] 
Add test for #1357 (detection of pzstd compressed files)

4 years agoMerge pull request #1357 from mako2580/master
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

4 years agoMerge pull request #1360 from EricAustinYu/master
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

4 years agoFix retrieving incorrect member from struct statfs
Martin Matuska [Thu, 30 Apr 2020 01:46:05 +0000 (03:46 +0200)] 
Fix retrieving incorrect member from struct statfs

Fixes #1355

4 years agotar reader: update handling of RHT.security.selinux xattr
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

4 years agoMerge pull request #1372 from evelikov/single-child
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

4 years agoMerge pull request #1371 from evelikov/digest-ifdef
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

4 years agoMerge pull request #1365 from AdamKorcz/master
Martin Matuška [Thu, 30 Apr 2020 01:31:42 +0000 (03:31 +0200)] 
Merge pull request #1365 from AdamKorcz/master

Added seed corpus

4 years agofix typo in README.md (#1373)
Terrell Russell [Sun, 26 Apr 2020 00:50:23 +0000 (20:50 -0400)] 
fix typo in README.md (#1373)

4 years agoRemove CloseHandle() from __archive_write_program_free 1372/head
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>
4 years agoCall OpenProcess() from within __archive_create_child()
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>
4 years agoChange __archive_create_child() signature
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>
4 years agoMoved the corpus file to the contrib dir 1365/head
Adam Korczynski [Sat, 25 Apr 2020 16:19:29 +0000 (17:19 +0100)] 
Moved the corpus file to the contrib dir

4 years agoRemove #ifdef chain in __archive_digest init 1371/head
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>
4 years agoMerge pull request #1363 from aseprite/dont-test-lzma-if-not-needed
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

4 years agoMerge pull request #1364 from aseprite/macos-no-deprecated
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

4 years agoMerge pull request #1362 from aseprite/libarchive.pc-in-binary-dir
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

4 years agoMerge pull request #1361 from aseprite/fix-msvc-warning-flags
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

4 years agoMerge pull request #1367 from zoulasc/master
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

4 years agoMake variable const since it is assigned from a string literal 1367/head
Christos Zoulas [Wed, 22 Apr 2020 15:00:26 +0000 (11:00 -0400)] 
Make variable const since it is assigned from a string literal

4 years agoAdd missing breaks
Christos Zoulas [Wed, 22 Apr 2020 15:00:13 +0000 (11:00 -0400)] 
Add missing breaks

4 years agoAdded seed corpus
Adam Korczynski [Tue, 21 Apr 2020 17:23:53 +0000 (18:23 +0100)] 
Added seed corpus

4 years agoUse /w1nnnn instead of /wennnn to enable warnings on MSVC Debug mode 1361/head
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).

4 years agoDisable error using deprecated functions on macOS 10.15 to calculate MD5 1364/head
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

4 years agoDon't even try HAVE_LZMA_STREAM_ENCODER_MT if ENABLE_LZMA is disabled 1363/head
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

4 years agoCreate libarchive.pc inside the cmake build dir 1362/head
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.

4 years agoMerge pull request #1348 from mikhailnov/rh-selinux
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

4 years agoMerge pull request #1359 from hjmallon/pr.neg_zstd_2
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

4 years agoRemove unreachable code in RAR reader 1360/head
Eric Yu [Tue, 14 Apr 2020 16:22:54 +0000 (11:22 -0500)] 
Remove unreachable code in RAR reader

4 years agozstd: Improve version checking 1359/head
Harry Mallon [Tue, 14 Apr 2020 13:37:28 +0000 (14:37 +0100)] 
zstd: Improve version checking

4 years agoMerge pull request #1352 from hjmallon/pr.negative_zstd
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

4 years agoMerge pull request #1356 from robUx4/svfs-variable
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

4 years agozstd: Add support for files created with pzstd 1357/head
Matúš Olekšák [Wed, 8 Apr 2020 18:48:16 +0000 (20:48 +0200)] 
zstd: Add support for files created with pzstd

4 years agozstd: Support negative compression-levels 1352/head
Harry Mallon [Wed, 11 Mar 2020 12:47:49 +0000 (12:47 +0000)] 
zstd: Support negative compression-levels

4 years agoconsistently use svfs for statvfs variables 1356/head
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.

4 years agoMerge pull request #1354 from robUx4/local-mode_t-fix
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

4 years agoarchive_entry: use the proper define for mode_t 1354/head
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

4 years agoMerge pull request #1350 from josch/master
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

4 years agoMerge pull request #1342 from hjmallon/pr.fix_high_zstd
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

4 years agoCI: build Windows version with xz 5.2.5
Martin Matuska [Sat, 28 Mar 2020 07:23:28 +0000 (08:23 +0100)] 
CI: build Windows version with xz 5.2.5

4 years agolibarchive/archive_entry_stat.3: typo nlinks -> nlink 1350/head
Johannes 'josch' Schauer [Mon, 23 Mar 2020 10:21:55 +0000 (11:21 +0100)] 
libarchive/archive_entry_stat.3: typo nlinks -> nlink

4 years agoSupport RHT.security.selinux from GNU tar 1348/head
Mikhail Novosyolov [Thu, 19 Mar 2020 22:13:23 +0000 (01:13 +0300)] 
Support RHT.security.selinux from GNU tar

4 years agozstd: Fix support for compression-level>=20 when using binary 1342/head
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

4 years agozstd: Use --no-check with binary to match library default
Harry Mallon [Wed, 11 Mar 2020 12:06:51 +0000 (12:06 +0000)] 
zstd: Use --no-check with binary to match library default

4 years agoSafe writes: improve error handling
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.

4 years agoAdd archive_write_disk_windows.c counterpart to previous commit
Martin Matuska [Mon, 2 Mar 2020 01:58:57 +0000 (02:58 +0100)] 
Add archive_write_disk_windows.c counterpart to previous commit

4 years agoStore errno when unlinking after rename on safe write failed
Martin Matuska [Mon, 2 Mar 2020 01:45:50 +0000 (02:45 +0100)] 
Store errno when unlinking after rename on safe write failed

4 years agocpio/cpio.c: Fix off-by-one in previous commit
Martin Matuska [Mon, 2 Mar 2020 01:40:10 +0000 (02:40 +0100)] 
cpio/cpio.c: Fix off-by-one in previous commit

4 years agocpio/cpio.c: avoid calling strlen() for destdir twice
Martin Matuska [Sun, 1 Mar 2020 23:48:47 +0000 (00:48 +0100)] 
cpio/cpio.c: avoid calling strlen() for destdir twice

4 years agoSafe writes: delete temporary file if rename fails
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

4 years agoCI: GitHub Actions: use C:\windows\system32\tar.exe as tar on Windows
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

4 years agobsdcpio_test: from_hex() needs to be an uint32_t
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

4 years agoXAR reader: initialize file_queue with 0 and memcpy() if allocated only
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

4 years agoCI: use static CMake build of liblzma
Martin Matuska [Tue, 25 Feb 2020 23:09:27 +0000 (00:09 +0100)] 
CI: use static CMake build of liblzma

4 years agoCI: various adjustments
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

4 years agoarchive_read.c: silence UBSan warning about undefined behavior
Kamil Rytarowski [Mon, 24 Feb 2020 21:58:00 +0000 (22:58 +0100)] 
archive_read.c: silence UBSan warning about undefined behavior

Fixes #1335

4 years agoMerge pull request #1331 from cure/patch-1
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

4 years agoNew ASCII format: fix hard link description 1331/head
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!

4 years agoXAR writer: initialize size with 0 in xar_write_data()
Martin Matuska [Thu, 13 Feb 2020 00:23:08 +0000 (01:23 +0100)] 
XAR writer: initialize size with 0 in xar_write_data()

4 years agoSolve warning by excluding more code to _WIN32 in file_open()
Martin Matuska [Thu, 13 Feb 2020 00:20:18 +0000 (01:20 +0100)] 
Solve warning by excluding more code to _WIN32 in file_open()

4 years agoAdd testcase for ZIPX files with LZMA_STREAM_END marker
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)

4 years agoCI: add external binary static xz to Windows build
Martin Matuska [Wed, 12 Feb 2020 13:38:45 +0000 (14:38 +0100)] 
CI: add external binary static xz to Windows build

4 years agoConstify name in __archive_write_entry_filetype_unsupported()
Martin Matuska [Wed, 12 Feb 2020 00:11:18 +0000 (01:11 +0100)] 
Constify name in __archive_write_entry_filetype_unsupported()

4 years agoLibarchive 3.4.3dev
Martin Matuska [Tue, 11 Feb 2020 23:09:00 +0000 (00:09 +0100)] 
Libarchive 3.4.3dev

4 years agoLibarchive 3.4.2 v3.4.2
Martin Matuska [Tue, 11 Feb 2020 21:49:11 +0000 (22:49 +0100)] 
Libarchive 3.4.2

4 years agoAdd script to generate release files with Docker.
Martin Matuska [Tue, 11 Feb 2020 17:40:54 +0000 (18:40 +0100)] 
Add script to generate release files with Docker.

4 years agoUnlink before creating a hardlink on Windows
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.

4 years agoMerge pull request #1330 from zoulasc/master
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

4 years agoJust like the hard link case, for symlinks we need to remove first 1330/head
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.

4 years agoUpdate NEWS
Martin Matuska [Mon, 10 Feb 2020 13:46:15 +0000 (14:46 +0100)] 
Update NEWS

4 years agoRAR5 reader: use %zu to sprintf() size_t
Martin Matuska [Mon, 10 Feb 2020 13:26:17 +0000 (14:26 +0100)] 
RAR5 reader: use %zu to sprintf() size_t

4 years agoCI Windows: download zlib and bzip2 from cloned repositories
Martin Matuska [Sun, 9 Feb 2020 07:15:58 +0000 (08:15 +0100)] 
CI Windows: download zlib and bzip2 from cloned repositories

4 years agoCI: generate and publish build artifacts on GitHub actions
Martin Matuska [Sat, 8 Feb 2020 22:02:53 +0000 (23:02 +0100)] 
CI: generate and publish build artifacts on GitHub actions

Fixes #1313

4 years agoCI: build and use bzip2 on Windows from GiLab repository
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.

4 years agoMerge pull request #1329 from bradking/string-append-wcs-overflow
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

4 years agoRAR5 reader: do not mutate a global variable
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

4 years agoCI: exit with error on failure in Visual Studio stages
Martin Matuska [Fri, 7 Feb 2020 09:45:15 +0000 (10:45 +0100)] 
CI: exit with error on failure in Visual Studio stages

4 years ago7z reader: support Delta filter with values 2-256
Martin Matuska [Thu, 6 Feb 2020 20:44:30 +0000 (21:44 +0100)] 
7z reader: support Delta filter with values 2-256

Fixes #987

4 years agoFix possible heap-buffer-overflow in archive_string_append_from_wcs on Windows 1329/head
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.

4 years agoMerge pull request #1326 from antekone/rar5_ossfuzz_20459
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

4 years agoRAR5 reader: reject files that declare invalid header flags 1326/head
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.

4 years agoMerge pull request #1324 from bradking/solaris-11.4
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

4 years agoFix use after free in ISO9660 and XAR writer
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

4 years agoUpdate filter and format options in manual pages.
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

4 years agomtree reader: initialize checkfs with 0
Martin Matuska [Thu, 30 Jan 2020 23:29:35 +0000 (00:29 +0100)] 
mtree reader: initialize checkfs with 0

4 years agolibarchive: Fix detection of 'major' on Solaris 11.4 1324/head
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.

4 years agoCmake MSVC: replace warning C4061 with C4062
Martin Matuska [Mon, 27 Jan 2020 23:25:53 +0000 (00:25 +0100)] 
Cmake MSVC: replace warning C4061 with C4062

Fixes #1322

4 years agotest_write_format_xar: add "none" options to test
Martin Matuska [Sun, 26 Jan 2020 00:20:36 +0000 (01:20 +0100)] 
test_write_format_xar: add "none" options to test

4 years agoPAX writer: fix return-on-error memory leaks in archive_write_pax_header()
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()

4 years agoPAX writer: fix entry uname or gname longer than 32 characters
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

4 years agoUnify unsupported entry file type error message in writer
Martin Matuska [Sat, 25 Jan 2020 13:26:59 +0000 (14:26 +0100)] 
Unify unsupported entry file type error message in writer

Closes #1320

4 years agoXAR writer: fix compression output buffer handling
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

4 years agoCI: make mingw32-make verbose
Martin Matuska [Wed, 22 Jan 2020 22:30:32 +0000 (23:30 +0100)] 
CI: make mingw32-make verbose

4 years agoAdd printf attributes to the printflike functions used in tests and fix
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

4 years agoRAR5 reader: refactored parse_tables() a little bit
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