mirror of https://git.tukaani.org/xz.git
liblzma: Add NULL check to lzma_index_hash_append.
This is for consistency with lzma_index_append.
This commit is contained in:
parent
203b008eb2
commit
f16e12d5e7
|
@ -145,7 +145,7 @@ lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli unpadded_size,
|
||||||
lzma_vli uncompressed_size)
|
lzma_vli uncompressed_size)
|
||||||
{
|
{
|
||||||
// Validate the arguments.
|
// Validate the arguments.
|
||||||
if (index_hash->sequence != SEQ_BLOCK
|
if (index_hash == NULL || index_hash->sequence != SEQ_BLOCK
|
||||||
|| unpadded_size < UNPADDED_SIZE_MIN
|
|| unpadded_size < UNPADDED_SIZE_MIN
|
||||||
|| unpadded_size > UNPADDED_SIZE_MAX
|
|| unpadded_size > UNPADDED_SIZE_MAX
|
||||||
|| uncompressed_size > LZMA_VLI_MAX)
|
|| uncompressed_size > LZMA_VLI_MAX)
|
||||||
|
|
Loading…
Reference in New Issue