From 13a74b78e37f16c9096ba5fe1859cc04eaa2f9f7 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 13 Sep 2008 12:10:43 +0300 Subject: Renamed constants: - LZMA_VLI_VALUE_MAX -> LZMA_VLI_MAX - LZMA_VLI_VALUE_UNKNOWN -> LZMA_VLI_UNKNOWN - LZMA_HEADER_ERRRO -> LZMA_OPTIONS_ERROR --- src/liblzma/common/index_hash.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/liblzma/common/index_hash.c') diff --git a/src/liblzma/common/index_hash.c b/src/liblzma/common/index_hash.c index dc533f9e..5e581838 100644 --- a/src/liblzma/common/index_hash.c +++ b/src/liblzma/common/index_hash.c @@ -150,9 +150,9 @@ lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli total_size, lzma_vli uncompressed_size) { // Validate the arguments. - if (index_hash->sequence != SEQ_BLOCK || total_size == 0 || - total_size > LZMA_VLI_VALUE_MAX || (total_size & 3) - || uncompressed_size > LZMA_VLI_VALUE_MAX) + if (index_hash->sequence != SEQ_BLOCK || total_size == 0 + || total_size > LZMA_VLI_MAX || (total_size & 3) + || uncompressed_size > LZMA_VLI_MAX) return LZMA_PROG_ERROR; // Update the hash. @@ -160,16 +160,15 @@ lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli total_size, total_size, uncompressed_size)); // Validate the properties of *info are still in allowed limits. - if (index_hash->blocks.total_size > LZMA_VLI_VALUE_MAX - || index_hash->blocks.uncompressed_size - > LZMA_VLI_VALUE_MAX + if (index_hash->blocks.total_size > LZMA_VLI_MAX + || index_hash->blocks.uncompressed_size > LZMA_VLI_MAX || index_size(index_hash->blocks.count, index_hash->blocks.index_list_size) > LZMA_BACKWARD_SIZE_MAX || index_stream_size(index_hash->blocks.total_size, index_hash->blocks.count, index_hash->blocks.index_list_size) - > LZMA_VLI_VALUE_MAX) + > LZMA_VLI_MAX) return LZMA_DATA_ERROR; return LZMA_OK; -- cgit v1.2.3