cab: Use correct limit in lzx_make_huffman_table

The table size is in bytes, but bitlen must be checked against maximum
bit length allowed.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
This commit is contained in:
Tobias Stoeckmann committed 2026-07-09 08:37:34 +02:00
1 parent dcf31bea79
commit 8d22629c9e
1 file changed
+1 -1
+1 -1
View File
@@ -3362,7 +3362,7 @@ lzx_make_huffman_table(struct huffman *hf)
continue;
/* Get a bit pattern */
len = bitlen[i];
if (len > tbl_size)
if (len > maxbits)
return (ARCHIVE_FATAL);
ptn = bitptn[len];
cnt = weight[len];