mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 725353525e
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
7d5ca21698
commit
e5296dfffa
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user