From: Jia Tan Date: Mon, 28 Aug 2023 13:50:16 +0000 (+0800) Subject: liblzma: Update assert in vli_ceil4(). X-Git-Tag: v5.5.1alpha~208 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=721e3d9f7a82f59f32795d5fb97e0210d1aa839a;p=thirdparty%2Fxz.git 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. --- 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); }