diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2014-08-05 22:03:30 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2014-08-05 22:03:30 +0300 |
commit | 0e0f34b8e4f1c60ecaec15c2105982381cc9c3e6 (patch) | |
tree | b3bf3edf8e17dcb53f0bad5edc6403947a5ef72d /src/liblzma/common/block_util.c | |
parent | liblzma: Use lzma_memcmplen() in the BT3 match finder. (diff) | |
download | xz-0e0f34b8e4f1c60ecaec15c2105982381cc9c3e6.tar.xz |
liblzma: Add support for lzma_block.ignore_check.
Note that this slightly changes how lzma_block_header_decode()
has been documented. Earlier it said that the .version is set
to the lowest required value, but now it says that the .version
field is kept unchanged if possible. In practice this doesn't
affect any old code, because before this commit the only
possible .version was 0.
Diffstat (limited to 'src/liblzma/common/block_util.c')
-rw-r--r-- | src/liblzma/common/block_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblzma/common/block_util.c b/src/liblzma/common/block_util.c index 62c93454..00c7fe8d 100644 --- a/src/liblzma/common/block_util.c +++ b/src/liblzma/common/block_util.c @@ -51,7 +51,7 @@ 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 == NULL || block->version != 0 + if (block == NULL || block->version > 1 || block->header_size < LZMA_BLOCK_HEADER_SIZE_MIN || block->header_size > LZMA_BLOCK_HEADER_SIZE_MAX || (block->header_size & 3) |