diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2022-10-25 19:07:17 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2022-10-25 19:07:17 +0300 |
commit | f9913e8ee2ba0b1e4ff4d0aa4c001aae305ed944 (patch) | |
tree | 437c2949ab52b988803889c3c72cdf949dde85b6 /src/liblzma/delta/delta_common.h | |
parent | xz: Clarify the man page: input file isn't removed if an error occurs. (diff) | |
download | xz-f9913e8ee2ba0b1e4ff4d0aa4c001aae305ed944.tar.xz |
xz: Fix decompressor behavior if input uses an unsupported check type.
Now files with unsupported check will make xz display
a warning, set the exit status to 2 (unless --no-warn is used),
and then decompress the file normally. This is how it was
supposed to work since the beginning but this was broken by
the commit 231c3c7098f1099a56abb8afece76fc9b8699f05, that is,
a little before 5.0.0 was released. The buggy behavior displayed
a message, set exit status 1 (error), and xz didn't attempt to
to decompress the file.
This doesn't matter today except for special builds that disable
CRC64 or SHA-256 at build time (but such builds should be used
in special situations only). The bug matters if new check type
is added in the future and an old xz version is used to decompress
such a file; however, it's likely that such files would use a new
filter too and an old xz wouldn't be able to decompress the file
anyway.
The first hunk in the commit is the actual fix. The second hunk
is a cleanup since LZMA_TELL_ANY_CHECK isn't used in xz.
There is a test file for unsupported check type but it wasn't
used by test_files.sh, perhaps due to different behavior between
xz and the simpler xzdec.
Diffstat (limited to 'src/liblzma/delta/delta_common.h')
0 files changed, 0 insertions, 0 deletions