aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2010-05-27 16:17:42 +0300
committerLasse Collin <lasse.collin@tukaani.org>2010-05-27 16:17:42 +0300
commit07dc34f6da45c9ab757dad7fd5eef522ad27d296 (patch)
tree171105b2976ef84bd3e160551fea5439733220bf /src/liblzma/common
parentTake Cygwin into account in some #if lines. (diff)
downloadxz-07dc34f6da45c9ab757dad7fd5eef522ad27d296.tar.xz
Fix lzma_block_compressed_size().
Diffstat (limited to '')
-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;