Refining the last Huffman fix found through fuzz testing

This commit is contained in:
Rich Geldreich
2019-05-09 22:00:59 -07:00
parent 6781292b3c
commit ce9aeb9cc8

View File

@@ -162,7 +162,14 @@ namespace basist
tree_next -= 2;
}
else
{
tree_cur = m_tree[idx];
if (tree_cur >= 0)
{
// Supplied codesizes can't create a valid prefix code.
return false;
}
}
}
tree_cur -= ((rev_code >>= 1) & 1);