diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2018-12-14 20:34:30 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2019-07-13 17:37:55 +0300 |
commit | 3ca432d9cce4bf7e793de173dd22025b68611c42 (patch) | |
tree | d2e9f555b6500ea9fa63404bb80e386abf770bb4 /src/xz/message.h | |
parent | xz: Update man page timestamp. (diff) | |
download | xz-3ca432d9cce4bf7e793de173dd22025b68611c42.tar.xz |
xz: Fix a crash in progress indicator when in passthru mode.
"xz -dcfv not_an_xz_file" crashed (all four options are
required to trigger it). It caused xz to call
lzma_get_progress(&strm, ...) when no coder was initialized
in strm. In this situation strm.internal is NULL which leads
to a crash in lzma_get_progress().
The bug was introduced when xz started using lzma_get_progress()
to get progress info for multi-threaded compression, so the
bug is present in versions 5.1.3alpha and higher.
Thanks to Filip Palian <Filip.Palian@pjwstk.edu.pl> for
the bug report.
Diffstat (limited to 'src/xz/message.h')
-rw-r--r-- | src/xz/message.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xz/message.h b/src/xz/message.h index 74599bd9..894ac783 100644 --- a/src/xz/message.h +++ b/src/xz/message.h @@ -150,7 +150,8 @@ extern void message_filename(const char *src_name); /// \param strm Pointer to lzma_stream used for the coding. /// \param in_size Size of the input file, or zero if unknown. /// -extern void message_progress_start(lzma_stream *strm, uint64_t in_size); +extern void message_progress_start(lzma_stream *strm, + bool is_passthru, uint64_t in_size); /// Update the progress info if in verbose mode and enough time has passed |