aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-01-16 13:27:03 +0200
committerLasse Collin <lasse.collin@tukaani.org>2008-01-16 13:27:03 +0200
commit9bc33a54cbf83952130adbcb1be32c6882485416 (patch)
treee697d8f07b3c8d5e67f8c349bf2137e1e8d19a84 /src/liblzma
parentFree the allocated memory in lzmadec if debugging is (diff)
downloadxz-9bc33a54cbf83952130adbcb1be32c6882485416.tar.xz
Make Uncompresed Size validation more strict
in alone_decoder.c.
Diffstat (limited to '')
-rw-r--r--src/liblzma/common/alone_decoder.c3
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;