]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/vqavideo: Set video size
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 25 Jul 2019 22:35:32 +0000 (00:35 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 5 Aug 2019 16:43:45 +0000 (18:43 +0200)
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@niedermayer.cc>
libavcodec/vqavideo.c

index 0e70be1000a1f45a1b84671966bffb3ca6c53f83..b9743abda95dee28a9623d42af7439358a605c74 100644 (file)
@@ -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;
     }