Dustin L. Howett
b738b9d38c
Merge pull request #3377 from stoeckmann/7zip_max_bid
...
CI / FreeBSD (autotools) (push) Failing after 7s
CI / FreeBSD (cmake) (push) Failing after 1s
CI / MacOS (autotools) (push) Canceled after 0s
CI / MacOS (cmake) (push) Canceled after 0s
CI / Ubuntu (autotools, mbedtls) (push) Canceled after 0s
CI / Ubuntu (autotools, nettle) (push) Canceled after 0s
CI / Ubuntu (autotools, openssl) (push) Canceled after 0s
CI / Ubuntu (cmake, mbedtls) (push) Canceled after 0s
CI / Ubuntu (cmake, nettle) (push) Canceled after 0s
CI / Ubuntu (cmake, openssl) (push) Canceled after 0s
CI / Ubuntu-distcheck (push) Canceled after 0s
CI / Windows (cygwin-gcc) (push) Canceled after 0s
CI / Windows (mingw-gcc) (push) Canceled after 0s
CI / Windows (msvc) (push) Canceled after 0s
Lint / Lint (push) Canceled after 0s
7zip: Fix max bidding check
2026-08-12 18:30:34 -05:00
Tobias Stoeckmann
daf210f18a
7zip: Fix max bidding check
...
The 7zip bidder can return 48, so maximum check of 32 is too small.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org >
2026-08-12 20:42:29 +02:00
Tim Kientzle
a16834cfc6
Merge pull request #3373 from stoeckmann/mem_seek
...
memory: Adjust seek logic
2026-08-11 19:38:17 -07:00
Tobias Stoeckmann
1cd388fc60
memory: Adjust seek logic
...
The seek implementations for files return ARCHIVE_FATAL if seek fails to
adjust the position. ARCHIVE_FAILED is used in case of pipes etc.
Also, if a file seek fails, the position is not adjusted.
Adjust the memory implementations to do the same.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org >
2026-08-11 21:34:28 +02:00
Dustin L. Howett
d304bbcc50
Merge pull request #3371 from stoeckmann/open_err_leak
...
Fix memory leaks on open error paths
2026-08-10 13:36:12 -05:00
Dustin L. Howett
ce01d3d86c
Merge pull request #3370 from stoeckmann/lrzip_bits
...
lrzip: Return matching bits in bidding
2026-08-10 13:35:40 -05:00
Tobias Stoeckmann
73412046b7
lrzip: Return matching bits in bidding
...
Actually follow the bidder comment and return amount of bits. Has the
nice advantage of removing the int/ssize_t handling, even though it was
safe anyway.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org >
2026-08-10 19:52:30 +02:00
Tobias Stoeckmann
98546092b9
Fix memory leaks on open error paths
...
If open functions fail to store client data, free internally allocated
memory before returning an error code.
Writer open functions must check magic themselves.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org >
2026-08-10 19:48:26 +02:00
Dustin L. Howett
ec398c5a4a
Merge pull request #3369 from libarchive/dependabot/github_actions/all-actions-6c7da2231a
...
CI: Bump the all-actions group with 4 updates
2026-08-10 11:26:44 -05:00
dependabot[bot]
9d0dedbe3b
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.4 to 4.37.6
- [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/f205ea1c3313d32999d8d6a48b4f6530d4437b38...5595ccaf912efad79be6eef63a5619ff05969be3 )
Updates `github/codeql-action/autobuild` from 4.37.4 to 4.37.6
- [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/f205ea1c3313d32999d8d6a48b4f6530d4437b38...5595ccaf912efad79be6eef63a5619ff05969be3 )
Updates `github/codeql-action/analyze` from 4.37.4 to 4.37.6
- [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/f205ea1c3313d32999d8d6a48b4f6530d4437b38...5595ccaf912efad79be6eef63a5619ff05969be3 )
Updates `github/codeql-action/upload-sarif` from 4.37.4 to 4.37.6
- [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/f205ea1c3313d32999d8d6a48b4f6530d4437b38...5595ccaf912efad79be6eef63a5619ff05969be3 )
---
updated-dependencies:
- dependency-name: github/codeql-action/init
dependency-version: 4.37.6
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: all-actions
- dependency-name: github/codeql-action/autobuild
dependency-version: 4.37.6
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: all-actions
- dependency-name: github/codeql-action/analyze
dependency-version: 4.37.6
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.6
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: all-actions
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-08-10 16:17:40 +00:00
Tim Kientzle
6ea9e10bc5
Merge pull request #3321 from carrerasdarren-cell/fix/cpio-newc-inode-synthesis
...
cpio: synthesize newc inode values
2026-08-10 06:58:16 -07:00
Darren Carreras
1803922e49
cpio: synthesize newc inode values
...
The newc format stores only 32-bit inode values. Assign unique
synthetic values from each full device and inode identity. This avoids
collisions after truncation while preserving hardlink groups.
Fixes #3314 .
2026-08-10 09:40:05 -04:00
Dustin L. Howett
b100df7e65
Merge pull request #3362 from stoeckmann/filter_bits
2026-08-10 00:53:31 -05:00
Darren Carreras
48fc018080
cpio: test synthetic newc inode values
...
Exercise large inode values that collide after 32-bit truncation,
hardlink identity, and distinct device IDs. Update bsdcpio expectations
so successful synthesis produces no truncation warnings.
2026-08-08 17:50:29 -04:00
Dustin L. Howett
682a87b111
Merge pull request #3365 from moodyastra/codex/libarchive-lzx-history-guard
...
cab: reject LZX matches before initialized history
2026-08-08 14:38:09 -05:00
Malachi Moody
9a76681531
cab: reject LZX matches before initialized history
2026-08-08 13:59:18 -05:00
Malachi Moody
88f49e2623
tests: reproduce invalid CAB LZX history reference
2026-08-08 13:59:18 -05:00
Dustin L. Howett
6b89e4f9d6
Merge pull request #3340 from subotac/fix/7zip-ppmd-small-read-buffer
...
7zip: Track PPMd input across read blocks
2026-08-08 13:10:12 -05:00
Dustin L. Howett
eff72295a6
Merge pull request #3354 from subotac/fix/write-close-fatal-state
...
Return fatal when closing a failed writer
2026-08-08 13:08:07 -05:00
Tobias Stoeckmann
0b42deee05
Merge pull request #3348 from stoeckmann/signature_len
...
program: Avoid signature length overflow
2026-08-08 17:54:31 +02:00
subotac
a6306a2197
7zip: Track PPMd input across read blocks
...
PPMd pulls input through its byte callback, so the regular input buffer does not track bytes consumed after crossing a read-block boundary. Advance the packed stream using the callback count and reject reads beyond the remaining packed data.
Resolves #3337
2026-08-08 14:48:15 +03:00
subotac
f514e28373
7zip: Add PPMd small read block regression test
...
The fixture and reproducer are based on the archive and report provided by @004helix in #3337 .
2026-08-08 14:31:35 +03:00
subotac
2af20746e6
Return fatal when closing a failed writer
...
Once an archive writer enters the fatal state, close should report that failure instead of proceeding as though it were usable.
Resolves #3353
2026-08-08 14:31:04 +03:00
subotac
0c4749950a
tests: Cover closing a failed writer
2026-08-08 14:31:04 +03:00
Dustin L. Howett
f7b8423a0a
Merge pull request #3363 from dnelson-1901/zero-tm
2026-08-07 22:39:45 -05:00
Dan Nelson
5a813c0282
rar: zero out stack-allocated struct tm before calling mktime()
...
Caught by valgrind
2026-08-07 21:35:38 -05:00
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
Tobias Stoeckmann
f815fc44e6
lz4/zstd: Count bits in bidder, not bytes
...
All other filters count bits as bidding result. Do so here as well.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org >
2026-08-07 22:40:33 +02:00
Tobias Stoeckmann
978a9184ec
lz4/zstd: Always check upper bid byte limit
...
If upstream filter provides huge amount of bytes, e.g. if archive is
fully stored in memory, bidding accesses too many bytes. This could in
turn overflow int return value, possibly leading to signed integer
overflows.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org >
2026-08-07 22:27:58 +02:00
Tobias Stoeckmann
c2c5fffe1c
zstd: Remove redundant errno.h include
...
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org >
2026-08-07 22:27:33 +02: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