aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/auto_decoder.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2013-04-05 19:34:09 +0300
committerLasse Collin <lasse.collin@tukaani.org>2013-04-05 19:34:09 +0300
commit9271a3eb0e022b23e8712154be851d0afe4c02e4 (patch)
treeed205154174ad4f0d1e313b7ef7387a690844403 /src/liblzma/common/auto_decoder.c
parentAvoid unneeded use of awk in xzless. (diff)
downloadxz-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/auto_decoder.c')
-rw-r--r--src/liblzma/common/auto_decoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblzma/common/auto_decoder.c b/src/liblzma/common/auto_decoder.c
index ae6c3e78..35c895fd 100644
--- a/src/liblzma/common/auto_decoder.c
+++ b/src/liblzma/common/auto_decoder.c
@@ -54,7 +54,7 @@ auto_decode(lzma_coder *coder, lzma_allocator *allocator,
coder->memlimit, coder->flags));
} else {
return_if_error(lzma_alone_decoder_init(&coder->next,
- allocator, coder->memlimit));
+ allocator, coder->memlimit, true));
// If the application wants to know about missing
// integrity check or about the check in general, we