mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/magicyuv: Free previous VLC table
Fixes: memleak
Fixes: 26788/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MAGICYUV_fuzzer-5184116808744960
Regression since: 1bf30a1beb
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2610acb49a
commit
bbba41704b
|
@ -89,6 +89,7 @@ static int huff_build(HuffEntry he[], uint16_t codes_count[33],
|
|||
he[i].code = codes_count[he[i].len];
|
||||
codes_count[he[i].len]++;
|
||||
}
|
||||
ff_free_vlc(vlc);
|
||||
return init_vlc(vlc, FFMIN(max, 12), nb_elems,
|
||||
&he[0].len, sizeof(he[0]), sizeof(he[0].len),
|
||||
&he[0].code, sizeof(he[0]), sizeof(he[0].code), 0);
|
||||
|
|
Loading…
Reference in New Issue