mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
Fix huffman fuzzer to not leak.
That was obviously intentional to see if the new fuzzer was working :) Bug: oss-fuzz=69825 Change-Id: Ie9465bb6225999fd792b712cc585ca3ee1ec528a
This commit is contained in:
parent
f2fe8decce
commit
c35c7e0240
@ -58,7 +58,7 @@ void HuffmanTest(std::string_view blob) {
|
|||||||
|
|
||||||
num_htree_groups = VP8LReadBits(br, kNumHtreeGroupsBits);
|
num_htree_groups = VP8LReadBits(br, kNumHtreeGroupsBits);
|
||||||
// 'num_htree_groups' cannot be 0 as it is built from a non-empty image.
|
// 'num_htree_groups' cannot be 0 as it is built from a non-empty image.
|
||||||
if (num_htree_groups == 0) return;
|
if (num_htree_groups == 0) goto Error;
|
||||||
// This variable is only useful when mapping is not NULL.
|
// This variable is only useful when mapping is not NULL.
|
||||||
num_htree_groups_max = num_htree_groups;
|
num_htree_groups_max = num_htree_groups;
|
||||||
(void)ReadHuffmanCodesHelper(color_cache_bits, num_htree_groups,
|
(void)ReadHuffmanCodesHelper(color_cache_bits, num_htree_groups,
|
||||||
|
Loading…
Reference in New Issue
Block a user