epan: Add a bounds check to tvb_uncompress_lz7huff()

This commit is contained in:
João Valverde 2022-12-16 16:13:17 +00:00
parent 730981f76a
commit 2de92a94df
1 changed files with 4 additions and 0 deletions

View File

@ -194,6 +194,10 @@ static int PrefixCodeTreeRebuild( struct hf_tree *tree,
j = 1;
for (; i < 512; i++) {
//ws_assert(j < TREE_SIZE);
if (j >= TREE_SIZE) {
return -1;
}
tree->nodes[j].symbol = symbolInfo[i].symbol;
tree->nodes[j].leaf = TRUE;
mask <<= symbolInfo[i].length - bits;