diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-01-26 13:06:49 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-01-26 13:06:49 +0200 |
commit | 1859d22d75e072463db74c25bc3f5a7992e5fdf6 (patch) | |
tree | 82b6ff0c9034b306b2a1165acab4b005a65ec113 /src | |
parent | Fix a dumb bug in Block decoder, which made it return (diff) | |
download | xz-1859d22d75e072463db74c25bc3f5a7992e5fdf6.tar.xz |
Tiny bit better sanity check in block_util.c
Diffstat (limited to '')
-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 1dccacf4..fa25b9a0 100644 --- a/src/liblzma/common/block_util.c +++ b/src/liblzma/common/block_util.c @@ -58,7 +58,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->version != 0 + if (block == NULL || block->version != 0 || block->header_size < LZMA_BLOCK_HEADER_SIZE_MIN || block->header_size > LZMA_BLOCK_HEADER_SIZE_MAX || (block->header_size & 3) |