aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-08-28 21:50:16 +0800
committerJia Tan <jiat0218@gmail.com>2023-10-26 06:22:24 +0800
commit773f1e8622cb1465df528cb16a749517650acd93 (patch)
tree89e7103373695d014dc6196a7962c37a38c78790
parentliblzma: Add overflow check for Unpadded size in lzma_index_append(). (diff)
downloadxz-773f1e8622cb1465df528cb16a749517650acd93.tar.xz
liblzma: Update assert in vli_ceil4().
The argument to vli_ceil4() should always guarantee the return value is also a valid lzma_vli. Thus the highest three valid lzma_vli values are invalid arguments. All uses of the function ensure this so the assert is updated to match this.
-rw-r--r--src/liblzma/common/index.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblzma/common/index.h b/src/liblzma/common/index.h
index 031efcc7..7b27d700 100644
--- a/src/liblzma/common/index.h
+++ b/src/liblzma/common/index.h
@@ -46,7 +46,7 @@ extern void lzma_index_prealloc(lzma_index *i, lzma_vli records);
static inline lzma_vli
vli_ceil4(lzma_vli vli)
{
- assert(vli <= LZMA_VLI_MAX);
+ assert(vli <= UNPADDED_SIZE_MAX);
return (vli + 3) & ~LZMA_VLI_C(3);
}