提交 02f909dc 编写于 作者: M Michael Niedermayer

avcodec/vqavideo: Set video size

Fixes: out of array access
Fixes: 15919/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-5657368257363968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 172a43ce
...@@ -147,7 +147,7 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx) ...@@ -147,7 +147,7 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
} }
s->width = AV_RL16(&s->avctx->extradata[6]); s->width = AV_RL16(&s->avctx->extradata[6]);
s->height = AV_RL16(&s->avctx->extradata[8]); s->height = AV_RL16(&s->avctx->extradata[8]);
if ((ret = av_image_check_size(s->width, s->height, 0, avctx)) < 0) { if ((ret = ff_set_dimensions(avctx, s->width, s->height)) < 0) {
s->width= s->height= 0; s->width= s->height= 0;
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册