diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2008-12-27 19:27:49 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2008-12-27 19:27:49 +0200 |
commit | e33194e79d8f5ce07cb4aca909b324ae75098f7e (patch) | |
tree | 6a1db024ccdbe49ea8d03dacf9ab0ebcedaa6688 /src/liblzma/common/block_util.c | |
parent | Updated Makefile.am that was missing from the previous commit. (diff) | |
download | xz-e33194e79d8f5ce07cb4aca909b324ae75098f7e.tar.xz |
Bunch of liblzma tweaks, including some API changes.
The API and ABI should now be very close to stable,
although the code behind it isn't yet.
Diffstat (limited to '')
-rw-r--r-- | src/liblzma/common/block_util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/liblzma/common/block_util.c b/src/liblzma/common/block_util.c index 2fa45841..1dccacf4 100644 --- a/src/liblzma/common/block_util.c +++ b/src/liblzma/common/block_util.c @@ -58,7 +58,8 @@ lzma_block_unpadded_size(const lzma_block *block) // NOTE: This function is used for validation too, so it is // essential that these checks are always done even if // Compressed Size is unknown. - if (block->header_size < LZMA_BLOCK_HEADER_SIZE_MIN + if (block->version != 0 + || block->header_size < LZMA_BLOCK_HEADER_SIZE_MIN || block->header_size > LZMA_BLOCK_HEADER_SIZE_MAX || (block->header_size & 3) || !lzma_vli_is_valid(block->compressed_size) |