1
0
mirror of https://git.tukaani.org/xz.git synced 2026-10-31 03:14:56 +00:00

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
This commit is contained in:
Darren Carreras 2026-07-27 22:13:09 -04:00 committed by Lasse Collin
parent 6097929ae8
commit c57500bda5
No known key found for this signature in database
GPG Key ID: 38EE757D69184620

View File

@ -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