mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
There's a bug where archives with multiple stream 0 entries per chunk can be corrupted on decompression with threading enabled.
Until the bug is tracked down, disable multithreaded decompression when an archive with interleaved stream 0/1 entries is detected.
This commit is contained in:
parent
2cabb335cb
commit
e1bb9ebda5
9
stream.c
9
stream.c
|
|
@ -1207,7 +1207,14 @@ fill_another:
|
|||
s->uthread_no, c_len, stream);
|
||||
create_pthread(&threads[s->uthread_no], NULL, ucompthread, (void *)s->uthread_no);
|
||||
|
||||
if (!last_head)
|
||||
if (stream == 0 && last_head && control.threads > 1) {
|
||||
int i;
|
||||
|
||||
print_verbose("Interleaved streams detected, dropping to single threaded decompression as a precaution.\n");
|
||||
for (i = 0; i < NUM_STREAMS; i++)
|
||||
sinfo->s[i].total_threads = 1;
|
||||
control.threads = 1;
|
||||
} else if (!last_head)
|
||||
s->eos = 1;
|
||||
|
||||
if (++s->uthread_no == s->base_thread + s->total_threads)
|
||||
|
|
|
|||
Loading…
Reference in a new issue