mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2025-02-11 07:05:43 +00: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>
This commit is contained in:
parent
ef5994e09d
commit
725353525e
@ -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…
x
Reference in New Issue
Block a user