mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
libarchive: Backport "Fix use of uninitialized values from Huffman table"
Backport libarchive commit `1f5454575f` (cab reader: Fix use of uninitialized values from Huffman, 2026-04-23). Add a fuzzing test case to expose this to dynamic analysis tools.
This commit is contained in:
Binary file not shown.
@@ -3201,6 +3201,10 @@ lzx_make_huffman_table(struct huffman *hf)
|
|||||||
bitlen = hf->bitlen;
|
bitlen = hf->bitlen;
|
||||||
len_avail = hf->len_size;
|
len_avail = hf->len_size;
|
||||||
hf->tree_used = 0;
|
hf->tree_used = 0;
|
||||||
|
/* Initialize table to invalid values */
|
||||||
|
for (i = 0; i < tbl_size; i++) {
|
||||||
|
tbl[i] = (uint16_t)hf->len_size;
|
||||||
|
}
|
||||||
for (i = 0; i < len_avail; i++) {
|
for (i = 0; i < len_avail; i++) {
|
||||||
uint16_t *p;
|
uint16_t *p;
|
||||||
int len, cnt;
|
int len, cnt;
|
||||||
|
|||||||
Reference in New Issue
Block a user