mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
avcodec/dxv: Check coded_height, to avoid invalid av_clip()
Fixes: assertion failure Fixes: 438961582/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_DEC_fuzzer-5850827739955200 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:
committed by
James Almer
parent
0a5046c099
commit
cdee519d40
@@ -940,6 +940,8 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame,
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (avctx->coded_height / 2 / TEXTURE_BLOCK_H < 1)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
texdsp_ctx.slice_count = av_clip(avctx->thread_count, 1,
|
||||
avctx->coded_height / TEXTURE_BLOCK_H);
|
||||
|
||||
Reference in New Issue
Block a user