aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/tiertexseqv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-05 12:48:12 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-17 20:35:19 +0200
commit8054b21f8d3e2200ec68f47935c1353d2bab4c56 (patch)
tree1e5c9f0d0b7d63224f7dba4593c9a4c5ce025beb /libavcodec/tiertexseqv.c
parent2fe493ed72cb96412500a61e3e11552a2f46d2cb (diff)
downloadffmpeg-8054b21f8d3e2200ec68f47935c1353d2bab4c56.tar.gz
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 ce551a3925a1cf9c7824e26a246b99b6773bda4b) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/tiertexseqv.c')
-rw-r--r--libavcodec/tiertexseqv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/tiertexseqv.c b/libavcodec/tiertexseqv.c
index df12ee3809..f86ae2aac1 100644
--- a/libavcodec/tiertexseqv.c
+++ b/libavcodec/tiertexseqv.c
@@ -213,10 +213,15 @@ static int seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int
static av_cold int seqvideo_decode_init(AVCodecContext *avctx)
{
SeqVideoContext *seq = avctx->priv_data;
+ int ret;
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);