[FFmpeg-cvslog] avcodec/vqavideo: Set video size

Michael Niedermayer git at videolan.org
Mon Aug 5 20:10:29 EEST 2019


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Jul 26 00:35:32 2019 +0200| [02f909dc24b1f05cfbba75077c7707b905e63cd2] | committer: 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/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02f909dc24b1f05cfbba75077c7707b905e63cd2
---

 libavcodec/vqavideo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index 0e70be1000..b9743abda9 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -147,7 +147,7 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
     }
     s->width = AV_RL16(&s->avctx->extradata[6]);
     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;
         return ret;
     }



More information about the ffmpeg-cvslog mailing list