projects
/
platform
/
upstream
/
xz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c5fe95
)
Tiny bit better sanity check in block_util.c
author
Lasse Collin
<lasse.collin@tukaani.org>
Mon, 26 Jan 2009 11:06:49 +0000
(13:06 +0200)
committer
Lasse Collin
<lasse.collin@tukaani.org>
Mon, 26 Jan 2009 11:06:49 +0000
(13:06 +0200)
src/liblzma/common/block_util.c
patch
|
blob
|
history
diff --git
a/src/liblzma/common/block_util.c
b/src/liblzma/common/block_util.c
index
1dccacf
..
fa25b9a
100644
(file)
--- 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)