Commit Graph
8101 Commits
Author SHA1 Message Date
Dustin L. Howett c63a9d33de Merge pull request #3357 from dnelson-1901/remove-cat
tar: manually combine test files instead of calling cat
2026-08-07 17:58:10 -05:00
Dustin L. Howett 01f717faea Merge pull request #3298 from DHowett/iso9660-nm-loop
iso9660: rewrite the "NM" extension generator for clarity
2026-08-07 17:57:32 -05:00
Dustin L. Howett 2b0e515913 iso9660: rewrite the "NM" extension generator for clarity
There are other such generators in this code, but this one was the
subject of a recent bug. It was unclear how it worked, since it broke
writing the header, continuation and final entries into three different
places.

I feel this version is more intuitive.
2026-08-07 17:01:14 -05:00
Dustin L. Howett 11fe99baf1 Merge pull request #3360 from subotac/fix/windows-empty-wcs-conversion 2026-08-07 16:51:03 -05:00
subotac ea6bff4f92 Fix empty wide string conversion on Windows 2026-08-06 21:29:20 +03:00
Dustin L. Howett b3b2f54e10 Merge pull request #3356 from dunhor/windows-clang-fixes
Fix a number of Windows/clang(-cl) issues
2026-08-06 11:38:16 -05:00
Dan Nelson 93fc73f6dc tar: manually combine test files instead of calling cat
Lets the --ignore-zeros tests run on Windows
2026-08-05 21:20:37 -05:00
Dustin L. Howett d07177dcc3 Merge pull request #3341 from subotac/fix/root-absolute-path-test 2026-08-05 20:26:26 -05:00
Duncan Horn f75ed3a205 Fix a number of Windows/clang(-cl) issues 2026-08-05 16:44:08 -07:00
Tim Kientzle ca8b5cdfe3 Merge pull request #3345 from PeiweiHu/peiwei_fix
Fix bsdtar’s `@archive` handling by freeing input readers after open failures and applying passphrases to the correct reader object.
2026-08-03 22:16:19 -07:00
Dustin L. Howett e5a65a5644 Merge pull request #3351 from stoeckmann/support_format
format: Improve format registration error handling
2026-08-03 17:26:03 -05:00
Tobias Stoeckmann af46e0e7b2 format: Unify support_format styles
Use same style across all formats for easier audits.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2026-08-03 19:57:25 +02:00
Tobias Stoeckmann cb3cd6f09c format: Unify support_format error handling
Always return r to unify style for easier audits.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2026-08-03 19:57:25 +02:00
Tobias Stoeckmann d42b4c1999 format: Forward errors/warnings in support_format
If registering a format parser bidder fails or triggers a warning,
forward the information instead of silently turning it into ARCHIVE_OK.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2026-08-03 19:57:25 +02:00
Tobias Stoeckmann a2b7dea95f format: Test error handling in support_format
Make sure that all formats return a warning if registered multiple
times.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2026-08-03 19:57:25 +02:00
Dustin L. Howett ada220177a Merge pull request #3347 from datauwu/archive-write-share-hdrcharset
archive_write: share hdrcharset option handling
2026-08-03 12:51:31 -05:00
Dustin L. Howett d83294359b Merge pull request #3346 from stoeckmann/append_filter_desync
Always attach filter to correct bidder
2026-08-03 12:48:35 -05:00
Dustin L. Howett 2d91e3a051 Merge pull request #3350 from libarchive/dependabot/github_actions/all-actions-4f142db38a
CI: Bump the all-actions group with 4 updates
2026-08-03 12:07:32 -05:00
dependabot[bot] b3d621f4c3 CI: Bump the all-actions group with 4 updates
Bumps the all-actions group with 4 updates: [github/codeql-action/init](https://github.com/github/codeql-action), [github/codeql-action/autobuild](https://github.com/github/codeql-action), [github/codeql-action/analyze](https://github.com/github/codeql-action) and [github/codeql-action/upload-sarif](https://github.com/github/codeql-action).


Updates `github/codeql-action/init` from 4.37.3 to 4.37.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81...f205ea1c3313d32999d8d6a48b4f6530d4437b38)

Updates `github/codeql-action/autobuild` from 4.37.3 to 4.37.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81...f205ea1c3313d32999d8d6a48b4f6530d4437b38)

Updates `github/codeql-action/analyze` from 4.37.3 to 4.37.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81...f205ea1c3313d32999d8d6a48b4f6530d4437b38)

Updates `github/codeql-action/upload-sarif` from 4.37.3 to 4.37.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81...f205ea1c3313d32999d8d6a48b4f6530d4437b38)

---
updated-dependencies:
- dependency-name: github/codeql-action/init
  dependency-version: 4.37.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-actions
- dependency-name: github/codeql-action/autobuild
  dependency-version: 4.37.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-actions
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.37.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-actions
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.37.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-03 16:18:20 +00:00
datauwu 86a88b9edf archive_write: share hdrcharset option handling
Several archive writers duplicate identical hdrcharset option handling.
Share the validation and conversion logic across the affected cpio, tar,
and zip writers.

This reduces duplication without changing behavior.
2026-08-03 16:53:58 +08:00
Dustin L. Howett c706ac4b56 Merge pull request #3312 from datauwu/formats-use-strrchr 2026-08-02 23:53:08 -05:00
Peiwei Hu 337e5fcd0c bsdtar: apply passphrase to appended archive reader
When creating an archive from an @archive argument, configure the
input reader rather than passing the output writer to
archive_read_add_passphrase(). Use the reader for error reporting as
well.
2026-08-03 08:49:58 +08:00
Peiwei Hu 7bd12a903f bsdtar: test passphrase for appended archives
Exercise --passphrase while copying entries from an encrypted
@archive into a new archive, then extract the result and verify the
copied file contents.
2026-08-03 08:49:51 +08:00
Peiwei Hu 0d71fa2ad7 bsdtar: free reader after failed archive open
append_archive_filename() returns after reporting an input archive open
failure so archive creation can continue. Release the input archive
reader before returning to avoid accumulating one reader for every
failed @archive argument.
2026-08-02 23:02:10 +08:00
Tim Kientzle 0c353e1a8f Merge pull request #3343 from dnelson-1901/tar-mode
tar: add --mode option for GNU tar compatibility
2026-08-02 07:34:39 -07:00
Tobias Stoeckmann 7c7d41c13c Remove bidder name
The name was only needed to find the appropriate bidder for a filter.
Since this has been resolved by accessing the last bidder, since in these
situations the bidder is added first, then the filter, the name is not
needed anymore.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2026-08-02 15:13:35 +02:00
Tobias Stoeckmann 50b585bb55 append_filter: Use last bidder for filter
Appending a filter implies appending a bidder. Always use the last added
bidder, since it was just added. This avoids desync situations where
previously added bidders could erroneously match.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2026-08-02 15:13:33 +02:00
Tobias Stoeckmann bf1f5ba79e append_filter: Verify that bidder and filter match
Make sure that appending a filter always matches its supposed bidder.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2026-08-02 15:12:59 +02:00
Dan Nelson c26faff361 tar: handle --mode when extracting archives also 2026-08-01 15:11:08 -05:00
Dan Nelson e8154e0bfc tar: add --mode option (compatible with gnutar) 2026-08-01 15:11:08 -05:00
Tim Kientzle e893064acf Merge pull request #3344 from datauwu/warc-fix-ub
warc: fix UB signed overflow in time conversion
2026-08-01 12:58:35 -07:00
datauwu c84de7963c warc: fix UB signed overflow in time conversion
Use checked 64-bit math when timegm() is not available.
Reject values outside time_t instead of overflowing signed integers.
2026-08-02 03:04:20 +08:00
datauwu 535360bfeb warc: test future date conversion
Add a WARC date after 2038 to cover the fallback time conversion.
On 64-bit time_t, it must parse as the expected Unix timestamp.
2026-08-02 02:57:01 +08:00
Tim Kientzle ea476d962f Merge pull request #3342 from datauwu/bsdcpio-fix-ub
bsdcpio: fix UB signed overflow in time formatting
2026-08-01 08:54:01 -07:00
datauwu 0da2e229b1 bsdtar: fix UB signed overflow in time formatting
Use difftime() instead of changing time_t values by the half-year
range. This avoids signed overflow near the time_t limits without
changing normal output.
2026-08-01 19:48:39 +08:00
datauwu efa19ce699 bsdcpio: fix UB signed overflow in time formatting
Use difftime() instead of subtracting time_t values when choosing the
date format. This avoids signed overflow for far past or future
timestamps without changing normal output.
2026-08-01 19:48:38 +08:00
subotac abba713e8e Clarify absolute path test extraction roots 2026-07-31 20:26:23 +03:00
Dustin L. Howett 8c4acda5e7 Merge pull request #3335 from jaipaulcheernam/fix/skip-ppmd8-aes256-test-without-crypto 2026-07-31 09:22:42 -05:00
Dustin L. Howett 280402b7f1 Merge pull request #3339 from datauwu/archive-string-fix-build 2026-07-30 18:21:32 -05:00
subotac 83a023ee30 Fix absolute path test when run as root 2026-07-30 18:40:17 +03:00
datauwu fcf3d40b3b archive_string: require localcharset.h for locale_charset
Only call locale_charset() when localcharset.h provides its declaration.
2026-07-30 16:20:51 +08:00
Jaipaul Cheernam c2b00a5fff test: skip ppmd8 aes256 streaming test when no crypto library is present
test_read_format_zip_ppmd8_aes256_streaming fails with 6 assertion
failures on systems without a crypto library (openssl/nettle/mbedtls)
because it tries to decrypt a pre-built encrypted zipx file without
checking crypto availability first.

Add the same guard used by the other encrypted zip tests in this file.

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
2026-07-29 13:37:21 +00:00
Dustin L. Howett 19ff56da4f Merge pull request #3320 from carrerasdarren-cell/fix/iso9660-boot-image-size-overflow
iso9660: avoid boot image block count overflow
2026-07-28 14:32:46 -05:00
carrerasdarren-cell f648978feb iso9660: avoid boot image block count overflow
Use overflow-free ceiling division before narrowing the boot image block count to int.

Fixes #3269
2026-07-28 14:53:36 -04:00
Dustin L. Howett 40da2cdc52 Merge pull request #3315 from datauwu/iso9660-remove-per-reader-comp-buf
iso9660: remove per-reader zero comparison buffer
2026-07-27 17:12:53 -05:00
Dustin L. Howett 10ea0e7499 Merge pull request #3302 from datauwu/program-read-fix-uaf
program: fix dangling pointer after close
2026-07-27 17:12:20 -05:00
Dustin L. Howett e207c4b357 Merge pull request #3317 from stoeckmann/rar5_varint
rar5: Improve varint handling
2026-07-27 16:08:31 -05:00
Tim Kientzle 4c5854ed69 Merge pull request #3329 from dag-erling/des/xar-unsup-digest
xar: Fix for unsupported digests
2026-07-27 12:36:40 -07:00
Dustin L. Howett ca6e125867 Merge pull request #3325 from tbontb-iaq/fix/seek-data-null-not-fatal
archive_read: don't poison archive when format lacks seek_data (fixes #3323)
2026-07-27 14:24:12 -05:00
Dag-Erling Smørgrav 4acbc50d7d xar: Fix for unsupported digests
* In _checksum_init() and _checksum_final(), fail if the requested digest
  is not supported (e.g. archive uses SHA256 but libarchive was compiled
  without SHA256 support)

* In checksum_init(), fail with a meaningful error message if either
  _checksum_init() call fails.

* In checksum_final(), simplify the logic and improve the error message.

* Make the various digest tests conditional on support for the digest
  being tested.

Fixes:		6f10adcd59 ("xar: Add support for SHA256 and SHA512")
2026-07-27 21:02:23 +02:00