avcodec/vc1dec: Clear block_index in vc1_decode_reset()

Fixes: 377965565/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1_fuzzer-4504434689769472
Fixes: out of array access

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 251de1791e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-12-01 23:30:55 +01:00
parent 34eb233f07
commit 719ebc4adb
No known key found for this signature in database
GPG key ID: B18E8928B3948D64

View file

@ -608,6 +608,7 @@ av_cold int ff_vc1_decode_end(AVCodecContext *avctx)
av_freep(&v->hrd_rate);
av_freep(&v->hrd_buffer);
ff_mpv_common_end(&v->s);
memset(v->s.block_index, 0, sizeof(v->s.block_index));
av_freep(&v->mv_type_mb_plane);
av_freep(&v->direct_mb_plane);
av_freep(&v->forward_mb_plane);