Commit 72535352 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/ulti: Check number of blocks at init

Fixes: Timeout
Fixes: 4832/clusterfuzz-testcase-4699096590843904

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent ef5994e0
......@@ -50,6 +50,8 @@ static av_cold int ulti_decode_init(AVCodecContext *avctx)
s->width = avctx->width;
s->height = avctx->height;
s->blocks = (s->width / 8) * (s->height / 8);
if (s->blocks == 0)
return AVERROR_INVALIDDATA;
avctx->pix_fmt = AV_PIX_FMT_YUV410P;
s->ulti_codebook = ulti_codebook;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment