1
0
镜像自地址 https://git.tukaani.org/xz.git 已同步 2026-10-31 03:14:56 +00:00

liblzma: Add NULL check to lzma_index_hash_append.

This is for consistency with lzma_index_append.
这个提交包含在:
Jia Tan 2022-08-17 20:20:16 +08:00 提交者 Lasse Collin
父节点 db714d30e0
当前提交 2ac7bafc8f

查看文件

@ -145,7 +145,7 @@ lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli unpadded_size,
lzma_vli uncompressed_size)
{
// 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_MAX
|| uncompressed_size > LZMA_VLI_MAX)