mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-24 07:46:56 +00:00
avcodec/tiertexseqv: set the fixed dimenasions, do not depend on the demuxer doing so
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>
(cherry picked from commit ce551a3925
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b0d6bff2f2
commit
a78cfe84f9
@ -213,10 +213,15 @@ static int seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int
|
|||||||
static av_cold int seqvideo_decode_init(AVCodecContext *avctx)
|
static av_cold int seqvideo_decode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
SeqVideoContext *seq = avctx->priv_data;
|
SeqVideoContext *seq = avctx->priv_data;
|
||||||
|
int ret;
|
||||||
|
|
||||||
seq->avctx = avctx;
|
seq->avctx = avctx;
|
||||||
avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
||||||
|
|
||||||
|
ret = ff_set_dimensions(avctx, 256, 128);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
seq->frame = av_frame_alloc();
|
seq->frame = av_frame_alloc();
|
||||||
if (!seq->frame)
|
if (!seq->frame)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
Loading…
Reference in New Issue
Block a user