aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/block_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblzma/common/block_util.c')
-rw-r--r--src/liblzma/common/block_util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liblzma/common/block_util.c b/src/liblzma/common/block_util.c
index cb9cde25..62c93454 100644
--- a/src/liblzma/common/block_util.c
+++ b/src/liblzma/common/block_util.c
@@ -15,7 +15,7 @@
extern LZMA_API(lzma_ret)
-lzma_block_compressed_size(lzma_block *block, lzma_vli total_size)
+lzma_block_compressed_size(lzma_block *block, lzma_vli unpadded_size)
{
// Validate everything but Uncompressed Size and filters.
if (lzma_block_unpadded_size(block) == 0)
@@ -25,13 +25,13 @@ lzma_block_compressed_size(lzma_block *block, lzma_vli total_size)
+ lzma_check_size(block->check);
// Validate that Compressed Size will be greater than zero.
- if (container_size <= total_size)
+ if (unpadded_size <= container_size)
return LZMA_DATA_ERROR;
// Calculate what Compressed Size is supposed to be.
// If Compressed Size was present in Block Header,
// compare that the new value matches it.
- const lzma_vli compressed_size = total_size - container_size;
+ const lzma_vli compressed_size = unpadded_size - container_size;
if (block->compressed_size != LZMA_VLI_UNKNOWN
&& block->compressed_size != compressed_size)
return LZMA_DATA_ERROR;