Fixes: out of array access
Fixes: 1348/clusterfuzz-testcase-minimized-
6195673642827776
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static av_cold int seqvideo_decode_init(AVCodecContext *avctx)
{
SeqVideoContext *seq = avctx->priv_data;
static av_cold int seqvideo_decode_init(AVCodecContext *avctx)
{
SeqVideoContext *seq = avctx->priv_data;
seq->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
seq->avctx = avctx;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
+ ret = ff_set_dimensions(avctx, 256, 128);
+ if (ret < 0)
+ return ret;
+
seq->frame = av_frame_alloc();
if (!seq->frame)
return AVERROR(ENOMEM);
seq->frame = av_frame_alloc();
if (!seq->frame)
return AVERROR(ENOMEM);