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:
Vincent Rabaud 2024-06-24 10:13:16 +02:00
parent f2fe8decce
commit c35c7e0240

View File

@ -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,