[FFmpeg-cvslog] avcodec/cdgraphics: Use ff_set_dimensions()
Michael Niedermayer
git at videolan.org
Thu Mar 14 18:51:39 EET 2019
ffmpeg | branch: release/4.1 | Michael Niedermayer <michael at niedermayer.cc> | Tue Mar 5 12:51:22 2019 +0100| [04ce4cc0728e35d908da7f5e1aa71f9adf0b65de] | committer: Michael Niedermayer
avcodec/cdgraphics: Use ff_set_dimensions()
Fixes: Timeout (17 sec -> 65 milli sec)
Fixes: 13264/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDGRAPHICS_fuzzer-5711167941509120
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 9a9f0e239c1c6f5c96cc90ba673087f86ca1eabc)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=04ce4cc0728e35d908da7f5e1aa71f9adf0b65de
---
libavcodec/cdgraphics.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c
index be85e54288..cf3f01a417 100644
--- a/libavcodec/cdgraphics.c
+++ b/libavcodec/cdgraphics.c
@@ -81,11 +81,8 @@ static av_cold int cdg_decode_init(AVCodecContext *avctx)
return AVERROR(ENOMEM);
cc->transparency = -1;
- avctx->width = CDG_FULL_WIDTH;
- avctx->height = CDG_FULL_HEIGHT;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
-
- return 0;
+ return ff_set_dimensions(avctx, CDG_FULL_WIDTH, CDG_FULL_HEIGHT);
}
static void cdg_border_preset(CDGraphicsContext *cc, uint8_t *data)
More information about the ffmpeg-cvslog
mailing list