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:
1 parent
dcf31bea79
commit
8d22629c9e
1 file changed
+1
-1
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user