diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2013-04-05 19:34:09 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2013-04-05 19:34:09 +0300 |
commit | 9271a3eb0e022b23e8712154be851d0afe4c02e4 (patch) | |
tree | ed205154174ad4f0d1e313b7ef7387a690844403 /src/liblzma/common/alone_decoder.h | |
parent | Avoid unneeded use of awk in xzless. (diff) | |
download | xz-9271a3eb0e022b23e8712154be851d0afe4c02e4.tar.xz |
liblzma: Be less picky in lzma_alone_decoder().
To avoid false positives when detecting .lzma files,
rare values in dictionary size and uncompressed size fields
were rejected. They will still be rejected if .lzma files
are decoded with lzma_auto_decoder(), but when using
lzma_alone_decoder() directly, such files will now be accepted.
Hopefully this is an OK compromise.
This doesn't affect xz because xz still has its own file
format detection code. This does affect lzmadec though.
So after this commit lzmadec will accept files that xz or
xz-emulating-lzma doesn't.
NOTE: lzma_alone_decoder() still won't decode all .lzma files
because liblzma's LZMA decoder doesn't support lc + lp > 4.
Reported here:
http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/7068827
Conflicts:
src/liblzma/common/alone_decoder.c
src/liblzma/common/alone_decoder.h
Diffstat (limited to 'src/liblzma/common/alone_decoder.h')
-rw-r--r-- | src/liblzma/common/alone_decoder.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/liblzma/common/alone_decoder.h b/src/liblzma/common/alone_decoder.h index 70d0d2a0..f666fc38 100644 --- a/src/liblzma/common/alone_decoder.h +++ b/src/liblzma/common/alone_decoder.h @@ -16,7 +16,8 @@ #include "common.h" -extern lzma_ret lzma_alone_decoder_init(lzma_next_coder *next, - lzma_allocator *allocator, uint64_t memlimit); +extern lzma_ret lzma_alone_decoder_init( + lzma_next_coder *next, lzma_allocator *allocator, + uint64_t memlimit, bool picky); #endif |