diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2008-01-16 13:27:03 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2008-01-16 13:27:03 +0200 |
commit | 9bc33a54cbf83952130adbcb1be32c6882485416 (patch) | |
tree | e697d8f07b3c8d5e67f8c349bf2137e1e8d19a84 /src/liblzma/common | |
parent | Free the allocated memory in lzmadec if debugging is (diff) | |
download | xz-9bc33a54cbf83952130adbcb1be32c6882485416.tar.xz |
Make Uncompresed Size validation more strict
in alone_decoder.c.
Diffstat (limited to 'src/liblzma/common')
-rw-r--r-- | src/liblzma/common/alone_decoder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/liblzma/common/alone_decoder.c b/src/liblzma/common/alone_decoder.c index 092047b4..91df5bf2 100644 --- a/src/liblzma/common/alone_decoder.c +++ b/src/liblzma/common/alone_decoder.c @@ -75,7 +75,8 @@ alone_decode(lzma_coder *coder, & (UINT32_C(1) << i)) ++count; - if (count > 1) + if (count != 1 || coder->options.lzma.dictionary_size + > LZMA_DICTIONARY_SIZE_MAX) return LZMA_DATA_ERROR; coder->pos = 0; |