aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/index_hash.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-09-13 12:10:43 +0300
committerLasse Collin <lasse.collin@tukaani.org>2008-09-13 12:10:43 +0300
commit13a74b78e37f16c9096ba5fe1859cc04eaa2f9f7 (patch)
treeaa9c137d41bd5d39fa8835cc77cf325ff13a7e7c /src/liblzma/common/index_hash.c
parentImproved the Stream Flags handling API. (diff)
downloadxz-13a74b78e37f16c9096ba5fe1859cc04eaa2f9f7.tar.xz
Renamed constants:
- LZMA_VLI_VALUE_MAX -> LZMA_VLI_MAX - LZMA_VLI_VALUE_UNKNOWN -> LZMA_VLI_UNKNOWN - LZMA_HEADER_ERRRO -> LZMA_OPTIONS_ERROR
Diffstat (limited to 'src/liblzma/common/index_hash.c')
-rw-r--r--src/liblzma/common/index_hash.c13
1 files changed, 6 insertions, 7 deletions
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;