From c57500bda55f61936c9d3afb701d42e92fc8508b Mon Sep 17 00:00:00 2001 From: Darren Carreras <283775510+carrerasdarren-cell@users.noreply.github.com> Date: Mon, 27 Jul 2026 22:13:09 -0400 Subject: [PATCH] liblzma: Preserve check statistics in lzma_index_dup() lzma_index_dup() copied the per-Stream flags but not the cached bitmask for all Streams except the last one. As a result, lzma_index_checks() on a duplicated multi-Stream Index reported only the Check type of its final Stream. Fixes: https://github.com/tukaani-project/xz/pull/238 --- src/liblzma/common/index.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/liblzma/common/index.c b/src/liblzma/common/index.c index c4aadb9b..4d641f9b 100644 --- a/src/liblzma/common/index.c +++ b/src/liblzma/common/index.c @@ -974,6 +974,7 @@ lzma_index_dup(const lzma_index *src, const lzma_allocator *allocator) dest->total_size = src->total_size; dest->record_count = src->record_count; dest->index_list_size = src->index_list_size; + dest->checks = src->checks; // Copy the Streams and the groups in them. const index_stream *srcstream