aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-08-28 21:50:16 +0800
committerJia Tan <jiat0218@gmail.com>2023-08-28 23:05:34 +0800
commit721e3d9f7a82f59f32795d5fb97e0210d1aa839a (patch)
tree3a5ce7f007cd0f9c620cd9d1170ff12dacdfa08a /src
parentliblzma: Add overflow check for Unpadded size in lzma_index_append(). (diff)
downloadxz-721e3d9f7a82f59f32795d5fb97e0210d1aa839a.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.
Diffstat (limited to 'src')
-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);
}