]>
git.ipfire.org Git - thirdparty/libarchive.git/log
Tim Kientzle [Sun, 14 Sep 2025 02:34:03 +0000 (19:34 -0700)]
Merge pull request #2734 from kientzle/kientzle-ignore-too-long-gzip-filename
Ignore over-long gzip filename
(cherry picked from commit
39dc43b3e0a78c83b41e2fa689e6ca32b3ebc4b6 )
Martin Matuška [Sat, 13 Sep 2025 20:01:52 +0000 (22:01 +0200)]
Merge pull request #2735 from kientzle/kientzle-err.h-conflict
Rename err.h to avoid conflict with system header
(cherry picked from commit
ab5cb61f498b1f076dc2e00e0ca3ef752eeb4424 )
Martin Matuška [Sat, 13 Sep 2025 19:36:29 +0000 (21:36 +0200)]
Merge pull request #2731 from mmatuska/fix/macosci
CI: add workaround for cmake installed from local/pinned tab on GH/MacOS
(cherry picked from commit
38debf6be13046b16abf0ec31349d7298b33280e )
Martin Matuška [Sat, 13 Sep 2025 19:36:13 +0000 (21:36 +0200)]
Merge pull request #2732 from mmatuska/fix/safe-dir-over-reg-win
win: add complementary safe writes fix for Windows to
27588eba5 (#2477)
(cherry picked from commit
e1dea559c7be34697270eccedf9f731ce00865b5 )
Martin Matuška [Wed, 10 Sep 2025 08:41:33 +0000 (10:41 +0200)]
Merge pull request #2670 from benoit-pierre/pr/fix_zip_writing_with_zstd_compression_method
zip: fix writing with ZSTD compression
(cherry picked from commit
589659ed7fe15cee514dda3dea81f4053de5a3f3 )
Martin Matuška [Wed, 10 Sep 2025 08:40:44 +0000 (10:40 +0200)]
Merge pull request #2477 from jrtc27/safe-dir-over-reg
Fix replacing a regular file with a dir for ARCHIVE_EXTRACT_SAFE_WRITES
(cherry picked from commit
52db141eced88e0aa43f8656211af8ed74c6c280 )
Martin Matuška [Wed, 10 Sep 2025 08:24:34 +0000 (10:24 +0200)]
Merge pull request #2686 from stoeckmann/lseek_win_regression
Fix Windows off_t handling
(cherry picked from commit
3b1100f9a9424b266fdb34256adbeb530bc79e5b )
Martin Matuška [Wed, 10 Sep 2025 08:22:58 +0000 (10:22 +0200)]
Merge pull request #2710 from meecash/CVE-2025-25724-check_strftime_result
Fix CVE-2025-25724 by checking the result of the strftime
(cherry picked from commit
6bd863f61281aecf2e78737b08838d4a27cf1fcb )
Tim Kientzle [Fri, 22 Aug 2025 15:13:40 +0000 (08:13 -0700)]
Merge pull request #2717 from peakschris/cb_windows
bsdtar: Allow @filename to have CRLF endings
(cherry picked from commit
53135ca48ed948216c1875888c8a1e30761610a1 )
Tim Kientzle [Wed, 20 Aug 2025 18:18:45 +0000 (11:18 -0700)]
Merge pull request #2707 from fdegros/close_range_support
Avoid leaking file descriptors into subprocesses
(cherry picked from commit
ab4d21e4cb1124d71232f81b33b2738d93c97b5a )
Tim Kientzle [Sat, 16 Aug 2025 16:27:11 +0000 (10:27 -0600)]
Merge pull request #2696 from al3xtjames/mkstemp
Fix mkstemp path in setup_mac_metadata
(cherry picked from commit
892f33145093d1c9b962b6521a6480dfea66ae00 )
Martin Matuška [Thu, 14 Aug 2025 21:22:30 +0000 (23:22 +0200)]
Merge pull request #2723 from KlaraSystems/des/couldnt-visit
archive_read_disk_posix: Don't pass -1 to a function expecting errno
(cherry picked from commit
bf50fe0538d1df428a93898c7f9b55a423621a41 )
Martin Matuška [Thu, 14 Aug 2025 21:20:55 +0000 (23:20 +0200)]
Merge pull request #2716 from antekone/bug/GH-2714/infinite-loop/1
RAR5 reader: early fail when file declares data for a dir entry
(cherry picked from commit
2db13f74226f766ef776dbe74654bcd7120a19e8 )
Martin Matuška [Thu, 14 Aug 2025 21:20:01 +0000 (23:20 +0200)]
Merge pull request #2713 from antekone/bug/GH-2711/crash-when-rr/1
RAR5 reader: fix multiple issues in extra field parsing function
(cherry picked from commit
93f9e93d73caa0d0a06e3d32cb7483a11afc41e9 )
Martin Matuška [Thu, 14 Aug 2025 21:17:39 +0000 (23:17 +0200)]
Merge pull request #2700 from mostynb/avoid_libxml2_deprecation_warnings
xar: avoid libxml2 deprecation warnings
(cherry picked from commit
12ffcef28c20530a6170ea3fd2a35ce8f8571cd7 )
Tim Kientzle [Sat, 2 Aug 2025 23:33:01 +0000 (16:33 -0700)]
Merge pull request #2712 from KlaraSystems/des/readdir_r
Drop support for readdir_r()
(cherry picked from commit
3bf1035e67404bb1ef869f1351382f89ab23a198 )
Tim Kientzle [Sat, 26 Jul 2025 19:24:43 +0000 (12:24 -0700)]
Merge pull request #2704 from kientzle/kientzle-harden-append-acl
Guard against invalid type arguments
(cherry picked from commit
6062470cbcf5ff76535b6f161ce9cc9f4c6f56c0 )
Tim Kientzle [Fri, 18 Jul 2025 02:18:53 +0000 (19:18 -0700)]
Merge pull request #2699 from mostynb/7z_eopm_reference
7z: add liblzma EOPM reference
(cherry picked from commit
cc97338239c5b1c0e0ffcb323d8cc4fd5929bf54 )
Tim Kientzle [Mon, 14 Jul 2025 17:05:56 +0000 (10:05 -0700)]
Merge pull request #2697 from Kraust/topic/cmake_build_fixes
Allow Compiling Against Static CRT.
(cherry picked from commit
cb6b9e9a28218aadcb0275e41af1e5ffda7598b2 )
Tim Kientzle [Sat, 12 Jul 2025 04:06:20 +0000 (21:06 -0700)]
Merge pull request #2694 from stoeckmann/cleanups
Perform various cleanups
(cherry picked from commit
267042ebc7de8e4972d43d0c02433184649c1d4f )
Tim Kientzle [Sun, 29 Jun 2025 19:03:51 +0000 (12:03 -0700)]
Merge pull request #2691 from kientzle/kientzle-issue2681
Add missing test file
(cherry picked from commit
d06700a0986b80c456d82800eaf1de872cf9ea6c )
Tim Kientzle [Sun, 29 Jun 2025 02:15:32 +0000 (19:15 -0700)]
Merge pull request #2664 from fedegiova/fix_leak_for_cb_error
Fix a memory leak if write callback error early
(cherry picked from commit
595fb29e4cf7cfd43bce0dfce7547cbcdfbd077b )
Tim Kientzle [Sun, 29 Jun 2025 02:14:17 +0000 (19:14 -0700)]
Merge pull request #2658 from stoeckmann/skip_tests
Skip tests if respective support is missing
(cherry picked from commit
609d8122f1c5210c57bcf14ac35cd4622b8546b1 )
Tim Kientzle [Sun, 29 Jun 2025 02:10:27 +0000 (19:10 -0700)]
Merge pull request #2673 from 004helix/master
archive_cryptor_private.h: check message digest functions are enabled for windows
(cherry picked from commit
31cff981e4fe9a583de43b239fb23e77045b293a )
Tim Kientzle [Sun, 29 Jun 2025 02:09:12 +0000 (19:09 -0700)]
Merge pull request #2679 from AZero13/error
Handle possible errors from system calls
(cherry picked from commit
d8aaf88c9feab047139df4cae60d845764a2480a )
Tim Kientzle [Sun, 29 Jun 2025 02:04:30 +0000 (19:04 -0700)]
Merge pull request #2687 from hemant-jadhav-emerson/master
Supress restrict keyword for msc_ver older than 1927
(cherry picked from commit
ee49ac81068f93754f004368f2cc72c95a8bf056 )
Tim Kientzle [Sat, 28 Jun 2025 21:23:02 +0000 (14:23 -0700)]
Merge pull request #2689 from ElvishJerricco/linux-fs-flags
clear_nochange_fflags: Use linux FS flags
(cherry picked from commit
9fe18ba0a644893c94d7b809885b4f32786a88ed )
Tim Kientzle [Sat, 28 Jun 2025 21:22:26 +0000 (14:22 -0700)]
Merge pull request #2684 from DHowett/dev/duhowett/shim_open
win32: shim wopen, and make both open/wopen use _s "secure" variant
(cherry picked from commit
cd020d1ccb9791057e7a13de51122dbe11fafa94 )
Tim Kientzle [Sat, 28 Jun 2025 21:11:17 +0000 (14:11 -0700)]
Merge pull request #2688 from stoeckmann/entry_off32
Ignore sizes which do not fit into off_t
(cherry picked from commit
a474bab7e381e4d54dc336b8206060e64b81cffd )
Tim Kientzle [Fri, 20 Jun 2025 21:33:45 +0000 (14:33 -0700)]
Merge pull request #2672 from AZero13/ferror
Fix error checking in writing files
(cherry picked from commit
ffde04f27231cabb91cebcbd7eca08d0f5088dc8 )
Tim Kientzle [Fri, 20 Jun 2025 16:32:51 +0000 (09:32 -0700)]
Merge pull request #2678 from mostynb/zstd_filter_checksum
Enable Zstandard's checksum feature in the zstd write filter
(cherry picked from commit
a218a52dbba98ff4071105207ff9275efff3eabe )
Tim Kientzle [Thu, 19 Jun 2025 23:12:26 +0000 (16:12 -0700)]
Merge pull request #2677 from AZero13/fwrite
Change error message from "fwrite function failed" to "write function failed"
(cherry picked from commit
e4978e2edd2b59ef93304e3534622a0647f05a73 )
Tim Kientzle [Thu, 19 Jun 2025 15:20:43 +0000 (08:20 -0700)]
Merge pull request #2676 from danyeaw/fix-pkgconf-path
Fix .pc location when CMAKE_INSTALL_LIBDIR not set
(cherry picked from commit
6a252c84a283789af4bf060b5d750840472dbdb2 )
Martin Matuška [Thu, 12 Jun 2025 08:59:43 +0000 (10:59 +0200)]
Merge pull request #2659 from stoeckmann/chld
Improve filter process handling
(cherry picked from commit
6effe2ec6bdc636573f9ea82bff3add632862333 )
Martin Matuška [Thu, 12 Jun 2025 08:57:17 +0000 (10:57 +0200)]
Merge pull request #2669 from benoit-pierre/pr/minor_test_related_tweaks
minor test related tweaks
(cherry picked from commit
251f7e839c17cbfffc08439ca332e13082ef6875 )
Martin Matuška [Thu, 12 Jun 2025 08:56:32 +0000 (10:56 +0200)]
Merge pull request #2663 from stoeckmann/filename_errpath
open_filename: Free memory on error paths
(cherry picked from commit
47bdf824892f09dc604a6de180202f0f61c225ff )
Martin Matuška [Thu, 12 Jun 2025 08:54:08 +0000 (10:54 +0200)]
Merge pull request #2665 from stoeckmann/read_data_sparse
archive_read_data: Handle sparse holes at end of file correctly
(cherry picked from commit
c3be70e0711b273bfa4f8dc41b8a88848473cec8 )
Martin Matuška [Thu, 12 Jun 2025 08:51:45 +0000 (10:51 +0200)]
Merge pull request #2668 from stoeckmann/7z_oob
7zip: Fix out of boundary access
(cherry picked from commit
9bdc5b82f7b98c9fa0c499268341be2aaf1f699e )
Tim Kientzle [Wed, 4 Jun 2025 12:58:32 +0000 (05:58 -0700)]
Merge pull request #2662 from stoeckmann/set_format_strcpy
archive_read_set_format: Remove strcpy calls
(cherry picked from commit
0931c12b7eb43bedefec4cde89e1e7e0b3d25477 )
Tim Kientzle [Tue, 3 Jun 2025 13:02:09 +0000 (06:02 -0700)]
Merge pull request #2660 from kevans91/ke/fix-fortify
libarchive/test: fix build when memcpy() is a macro
(cherry picked from commit
a8f93f2480a2a0511485e5a24cb975a0d205fec6 )
Tim Kientzle [Sun, 1 Jun 2025 23:04:49 +0000 (16:04 -0700)]
Merge pull request #2655 from mmatuska/fix/setclocale
test_utils/test_main.c: satisfy -Wstrict-prototypes
(cherry picked from commit
0f9a06d6abb1ab00e48580d488facbd78240ee50 )
Martin Matuska [Sun, 1 Jun 2025 19:26:44 +0000 (21:26 +0200)]
Release 3.8.1
Martin Matuška [Sat, 31 May 2025 19:40:04 +0000 (21:40 +0200)]
Merge pull request #2627 from heirecka/do-not-hard-code-pkg-config
Use PKG_CONFIG instead of hard-coded pkg-config
(cherry picked from commit
70978468e9078601d9f8e0c2be55762c0b3ff3e2 )
Martin Matuška [Sat, 31 May 2025 19:31:14 +0000 (21:31 +0200)]
Merge pull request #2643 from stoeckmann/tar_pax_sparse
tar: Handle extra bytes after sparse entries
(cherry picked from commit
c7b7bd7c0e3aa29caf874efe6686cd0f78e1842d )
Tim Kientzle [Sat, 31 May 2025 14:16:07 +0000 (07:16 -0700)]
Merge pull request #2652 from stoeckmann/wstring_ensure
Check archive_wstring_ensure return value
(cherry picked from commit
8d074302ac6b50e54d7e0430ced19c1b878cce32 )
Tim Kientzle [Sat, 31 May 2025 02:50:25 +0000 (19:50 -0700)]
Merge pull request #2651 from stoeckmann/string_ensure_check
Always check archive_string_ensure return value
(cherry picked from commit
101230094c5793b3f82a2f3531b0ebd4b406e85f )
Tim Kientzle [Sat, 31 May 2025 02:35:44 +0000 (19:35 -0700)]
Merge pull request #2648 from stoeckmann/test_en_us
test_utils: Enforce C locale for all tests
(cherry picked from commit
8540cb7cfbfb47340ecae856d7f2a1292096e936 )
Tim Kientzle [Sat, 31 May 2025 02:33:34 +0000 (19:33 -0700)]
Merge pull request #2650 from stoeckmann/string_sort
archive_utility_string_sort: Use qsort directly
(cherry picked from commit
e2eda9e68b7174eb37b80c0dd4761e71a989db5c )
Tim Kientzle [Fri, 30 May 2025 00:31:28 +0000 (17:31 -0700)]
Merge pull request #2634 from stoeckmann/tar_neg_time
tar: Support negative time values with pax
(cherry picked from commit
9b07a143ee0e55d04ef602e926f2d343ee5a9a8f )
Tim Kientzle [Thu, 29 May 2025 23:37:44 +0000 (16:37 -0700)]
Merge pull request #2649 from stoeckmann/compress_recursion
compress: Prevent call stack overflow
(cherry picked from commit
cd5c44c5d0470a5bb497541ae7bcb617c4480855 )
Tim Kientzle [Wed, 28 May 2025 03:55:15 +0000 (20:55 -0700)]
Merge pull request #2642 from stoeckmann/seek_regress
Fix FILE_skip regression
(cherry picked from commit
59b09796c3402489c3f47625b6401a28d24ad8a4 )
Tim Kientzle [Wed, 28 May 2025 03:52:36 +0000 (20:52 -0700)]
Merge pull request #2644 from stoeckmann/tar_neg_size
tar: Always treat negative sizes as error
(cherry picked from commit
d261f46ae57f115a48c0bef10643753cb305a9a5 )
Tim Kientzle [Wed, 28 May 2025 03:43:46 +0000 (20:43 -0700)]
Merge pull request #2645 from stoeckmann/tar_formatter
tar: Fix archive_set_error formatters
(cherry picked from commit
dcdd7338d68c30d8171b483c7fa25729ae1a1f56 )
Tim Kientzle [Wed, 28 May 2025 03:41:19 +0000 (20:41 -0700)]
Merge pull request #2646 from stoeckmann/sparse32
tar: Handle many sparse comments on 32 bit systems
(cherry picked from commit
702f31a01cf2a867b2df8c4be6a6d2e8ae403078 )
Tim Kientzle [Mon, 26 May 2025 16:06:47 +0000 (09:06 -0700)]
Merge pull request #2640 from robUx4/xml-uuid
[cmake] add uuid library when using xmllite
(cherry picked from commit
6389d172ed25de1b84606716553241c171a30111 )
Tim Kientzle [Sun, 25 May 2025 23:22:59 +0000 (16:22 -0700)]
Merge pull request #2637 from stoeckmann/pax_nl
tar: Keep block alignment after pax error
(cherry picked from commit
341dd5d1d45ce320ff05928e50efafd8ed42ed81 )
Tim Kientzle [Sun, 25 May 2025 23:19:38 +0000 (16:19 -0700)]
Merge pull request #2639 from stoeckmann/sprintf_ll
Add ll length modifier to archive_string_vsprintf
(cherry picked from commit
18d456377ea7c8fe7946fa7b45b87d5da294640b )
Tim Kientzle [Sun, 25 May 2025 00:18:00 +0000 (17:18 -0700)]
Merge pull request #2636 from zhaofengli/reset-header-state-after-mac-metadata
tar: Reset accumulated header state after reading macOS metadata blob
(cherry picked from commit
b6e1f06457e61c182dd2f34b9fb37701cfda041b )
Tim Kientzle [Sat, 24 May 2025 17:45:57 +0000 (10:45 -0700)]
Merge pull request #2630 from stoeckmann/wincrypt_casts
Fix archive_wincrypt_version
(cherry picked from commit
42c2f8464962990bf7df0df2f3cbd0ce80121190 )
Tim Kientzle [Sat, 24 May 2025 17:37:02 +0000 (10:37 -0700)]
Merge pull request #2633 from stoeckmann/match_cleanup
archive_match: Simplify and clean up code
(cherry picked from commit
6dbea2df3bc8288d52c65cb3d543a1e883162a20 )
Tim Kientzle [Sat, 24 May 2025 17:23:28 +0000 (10:23 -0700)]
Merge pull request #2632 from stoeckmann/cygwin_definition
Prefer __CYGWIN__ over CYGWIN definition
(cherry picked from commit
cdc185e9177edcdc03bb5c1983d59874d434fb12 )
Tim Kientzle [Sat, 24 May 2025 02:58:02 +0000 (19:58 -0700)]
Merge pull request #2631 from stoeckmann/configure_windows
configure.ac: Improve Windows version detection
(cherry picked from commit
0ed4435209b9b694cc190d937e4709a0609580e6 )
Tim Kientzle [Sat, 24 May 2025 02:57:14 +0000 (19:57 -0700)]
Merge pull request #2509 from tesap/install-lib-dir
Make installation lib dir depend on CMAKE_INSTALL_LIBDIR variable
(cherry picked from commit
992734d6cc557e3387f9cfd44a0cca3934d22262 )
Tim Kientzle [Sat, 24 May 2025 02:39:00 +0000 (19:39 -0700)]
Merge pull request #2629 from mmatuska/fix/versiontest
tests: accept underscore in arbitrary third-party version strings
(cherry picked from commit
627ba5bbbf80fe25dbf5015ef304a905a2820f17 )
Martin Matuska [Tue, 20 May 2025 08:35:37 +0000 (10:35 +0200)]
Release 3.8.0
dependabot[bot] [Tue, 20 May 2025 08:19:56 +0000 (10:19 +0200)]
CI: Bump the all-actions group across 1 directory with 4 updates (#2623)
Bumps the all-actions group with 4 updates:
`actions/checkout` from 4.2.1 to 4.2.2
`actions/upload-artifact` from 4.4.3 to 4.6.2
`github/codeql-action` from 3.26.12 to 3.28.18
`ossf/scorecard-action` from 2.4.0 to 2.4.1
Mostyn Bramley-Moore [Tue, 20 May 2025 08:14:17 +0000 (10:14 +0200)]
Add some more error checking to shell scripts (#2617)
Exit immediately if a command exits with a non-zero status, and treat
unset variables as an error when substituting.
Tim Kientzle [Tue, 20 May 2025 02:39:10 +0000 (19:39 -0700)]
Merge pull request #2612 from AZero13/okay-what
Fatal if field[0].start is null
Tim Kientzle [Tue, 20 May 2025 02:38:04 +0000 (19:38 -0700)]
Merge pull request #2622 from AZero13/calculate-size
Calculate size of arrays instead of assuming they are always 6
Tim Kientzle [Tue, 20 May 2025 02:36:57 +0000 (19:36 -0700)]
Merge pull request #2621 from AZero13/redundant-s
*s != '\0' is redundant
Tim Kientzle [Tue, 20 May 2025 02:34:24 +0000 (19:34 -0700)]
Merge pull request #2619 from AZero13/patch-2
days should be a long type
Tim Kientzle [Tue, 20 May 2025 02:32:32 +0000 (19:32 -0700)]
Merge pull request #2618 from AZero13/patch-1
Label error and errorx as __LA_NORETURN
Rose [Mon, 19 May 2025 19:19:57 +0000 (15:19 -0400)]
Calculate size of arrays instead of assuming they are always 6
Rose [Mon, 19 May 2025 19:16:18 +0000 (15:16 -0400)]
*s != '\0' is redundant
Not that this does anything to codegen probably, but it is still redundant.
Rose [Sat, 17 May 2025 23:35:22 +0000 (19:35 -0400)]
Fatal if field[0].start or field[0].end is null
We should not get here, but given that the check exists, we should not let it happen if this is NULL because otherwise we just dereference it later on.
AZero13 [Mon, 19 May 2025 17:39:32 +0000 (13:39 -0400)]
days should be a long type
The difference in years is cast to a long and then multiplied by 365. The return value of the function is also a long.
AZero13 [Mon, 19 May 2025 17:35:19 +0000 (13:35 -0400)]
Label error and errorx as __LA_NORETURN
This also prevents clang-tidy from reporting some false bugs.
Tim Kientzle [Sun, 18 May 2025 22:44:48 +0000 (15:44 -0700)]
Merge pull request #2611 from zhaofengli/fix-iconv-pc
autotools: Fix iconv issues in generated .pc file
Tim Kientzle [Sun, 18 May 2025 22:41:26 +0000 (15:41 -0700)]
Merge pull request #2613 from mmatuska/fix/7zipsfx-2
7z: fix another out-of-bounds read in 7z SFX archive detection
Tim Kientzle [Sun, 18 May 2025 22:26:17 +0000 (15:26 -0700)]
Merge pull request #2616 from mostynb/contrib_psota-benchmark_tcp_sh_bash
contrib/psota-benchmark/tcp.sh is a bash script
Tim Kientzle [Sun, 18 May 2025 22:25:11 +0000 (15:25 -0700)]
Merge pull request #2614 from AZero13/tar-2
Assign a result when failure happens
Tim Kientzle [Sun, 18 May 2025 21:59:36 +0000 (14:59 -0700)]
Merge pull request #2600 from nvinson/master
Copy ae digests to mtree_entry
Mostyn Bramley-Moore [Sun, 18 May 2025 16:55:32 +0000 (18:55 +0200)]
Remove long-unused travis CI script (#2615)
Support for travis CI was removed in 2019, this script hasn't been used
since.
Mostyn Bramley-Moore [Sun, 18 May 2025 10:58:27 +0000 (12:58 +0200)]
contrib/psota-benchmark/tcp.sh is a bash script
I am unsure if this is still used, but it fails to run in Bourne shell.
Rose [Sun, 18 May 2025 01:24:51 +0000 (21:24 -0400)]
Assign a result when failure happens
In some places, result is checked even after failure, so let's assign a result.
Martin Matuska [Sun, 18 May 2025 00:40:05 +0000 (02:40 +0200)]
7z: fix another out-of-bounds read in 7z SFX archive detection
When looping over program header entries (e_shnum)
we need to increment sec_tbl_offset by e_shentsize
and not by fixed values.
Fixes OSS-Fuzz issue
418349489
Tim Kientzle [Sun, 18 May 2025 00:15:03 +0000 (17:15 -0700)]
Merge pull request #2610 from stoeckmann/string_int_size_t
archive_string: Check values before casts
Zhaofeng Li [Sat, 17 May 2025 00:03:52 +0000 (18:03 -0600)]
autotools: Fix iconv issues in generated .pc file
The goal is to make everyone (including msys2) happy.
Fixes #1766 and #1819.
Signed-off-by: Zhaofeng Li <hello@zhaofeng.li>
Tim Kientzle [Sat, 17 May 2025 18:46:32 +0000 (11:46 -0700)]
Merge pull request #2609 from stoeckmann/safe_fprintf
tar: Handle more edge cases in safe_fprintf
Nicholas Vinson [Sat, 17 May 2025 15:30:23 +0000 (11:30 -0400)]
test_utils/test_main.c: increase logfilename bf sz
Increase logfilename buffer size from 64 to 256. This aligns the buffer
size with the size limits found in Windows and Linux.
Nicholas Vinson [Tue, 13 May 2025 23:38:50 +0000 (19:38 -0400)]
Replace struct ae_mset_digest with uint_least32_t
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Nicholas Vinson [Sun, 13 Apr 2025 11:33:43 +0000 (07:33 -0400)]
Copy ae digests to mtree_entry
Copy ae digests to mtree_entry. This simplifies porting non-archive
formats to archive formats while preserving supported message
digests specifically in cases where recomputing digests is not
viable.
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Tobias Stoeckmann [Sat, 17 May 2025 08:36:47 +0000 (10:36 +0200)]
archive_string: Check values before casts
The size_t to int conversion is especially required on Windows systems
to support their int-based functions. These variables should be properly
checked before casts. This avoids integer truncations with large
strings.
I prefer size_t over int for sizes and adjusted variables to size_t
where possible to avoid casts.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tim Kientzle [Fri, 16 May 2025 23:40:24 +0000 (16:40 -0700)]
Merge pull request #2604 from mmatuska/fix/7zipsfx
7z: fix out-of-bounds read in 7z self extracting archive detection
Tim Kientzle [Fri, 16 May 2025 22:49:16 +0000 (15:49 -0700)]
Merge pull request #2607 from zhaofengli/disallow-multiple-files-from
bsdtar: Disallow multiple --files-from/-T options
Tobias Stoeckmann [Fri, 16 May 2025 22:01:53 +0000 (00:01 +0200)]
tar: Make safe_fprintf more platform independent
If vsnprintf fails with errno EOVERFLOW, the results are very platform
dependent but never useful. The implementation in glibc fills bytes with
blanks, FreeBSD fills them with zeros, OpenBSD and Windows set first
byte to '\0'.
Just stop processing and don't print anything, which makes it follow
the OpenBSD and Windows approach.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Fri, 16 May 2025 21:25:42 +0000 (23:25 +0200)]
tar: Fix safe_fprintf comment
The stack buffer is never used for out of memory messages.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Fri, 16 May 2025 21:11:52 +0000 (23:11 +0200)]
tar: Support large strings in safe_fprintf
The vsnprintf calls might return INT_MAX with very long strings.
Prevent a signed integer overflow when taking an additional nul
byte into account.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Fri, 16 May 2025 21:08:59 +0000 (23:08 +0200)]
tar: Always use correct length in safe_fprintf
If the format buffer shall not be further increased in size, the
length value mistakenly takes the terminating nul byte into account.
This is in contrast to a successful vsnprintf call.
Also use the correct string length if fallback to stack buffer is
required.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Fri, 16 May 2025 21:50:27 +0000 (23:50 +0200)]
tar: Clear safe_fprintf stack before usage
The stack buffer is never cleared, which can become an issue depending
on vsnprintf implementation's behavior if -1 is returned. The code
would eventually fall back to stack buffer which might be not
nul terminated.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>