diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2025-08-19 03:12:37 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2025-08-19 11:25:39 -0300 |
commit | cdee519d40e61bd65ba5b3fbec00acd50a08d0d9 (patch) | |
tree | 2421eb5a89e7d49c9bb63b99799fcac3bcd95ade | |
parent | 0a5046c09996262d0f8b1802a4b34816f72fff06 (diff) | |
download | ffmpeg-cdee519d40e61bd65ba5b3fbec00acd50a08d0d9.tar.gz |
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>
-rw-r--r-- | libavcodec/dxv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c index de01f1bacf..07eee253e7 100644 --- a/libavcodec/dxv.c +++ b/libavcodec/dxv.c @@ -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); |