aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2022-11-08 23:05:37 +0200
committerLasse Collin <lasse.collin@tukaani.org>2022-11-08 23:05:37 +0200
commitfe6b8852a3c6a0eb5a3c33512e0a69af257d3bc7 (patch)
treec0779e0c32ccc1c6d32bd70fa868621371430af6 /src
parentDocs: Update faq.txt a little. (diff)
downloadxz-fe6b8852a3c6a0eb5a3c33512e0a69af257d3bc7.tar.xz
xz: Make xz -lvv show that the upcoming --arm64 needs 5.4.0 to decompress.
Diffstat (limited to 'src')
-rw-r--r--src/xz/list.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/xz/list.c b/src/xz/list.c
index 06c9c1ee..22d7c52b 100644
--- a/src/xz/list.c
+++ b/src/xz/list.c
@@ -544,16 +544,26 @@ parse_block_header(file_pair *pair, const lzma_index_iter *iter,
// Determine the minimum XZ Utils version that supports this Block.
//
- // Currently the only thing that 5.0.0 doesn't support is empty
- // LZMA2 Block. This decoder bug was fixed in 5.0.2.
- {
+ // - ARM64 filter needs 5.4.0.
+ //
+ // - 5.0.0 doesn't support empty LZMA2 streams and thus empty
+ // Blocks that use LZMA2. This decoder bug was fixed in 5.0.2.
+ if (xfi->min_version < 50040002U) {
+ for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
+ if (filters[i].id == LZMA_FILTER_ARM64) {
+ xfi->min_version = 50040002U;
+ break;
+ }
+ }
+ }
+
+ if (xfi->min_version < 50000022U) {
size_t i = 0;
while (filters[i + 1].id != LZMA_VLI_UNKNOWN)
++i;
if (filters[i].id == LZMA_FILTER_LZMA2
- && iter->block.uncompressed_size == 0
- && xfi->min_version < 50000022U)
+ && iter->block.uncompressed_size == 0)
xfi->min_version = 50000022U;
}