mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
avcodec/mvha: Check remaining bits in VLC decode loop
Fixes: timeout (252sec -> 170msec) Fixes: 20023/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MVHA_fuzzer-5681192565473280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a98eeb0c1e
commit
cce37a22bc
@ -233,6 +233,8 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
|
||||
dst = frame->data[p] + (avctx->height - 1) * frame->linesize[p];
|
||||
for (int y = 0; y < avctx->height; y++) {
|
||||
if (get_bits_left(gb) < width)
|
||||
return AVERROR_INVALIDDATA;
|
||||
for (int x = 0; x < width; x++) {
|
||||
int v = get_vlc2(gb, s->vlc.table, s->vlc.bits, 3);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user