This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit f157611470599783e3fcfe969407ea1912d1801b Author: Michael Niedermayer <[email protected]> AuthorDate: Sun Nov 8 01:47:35 2026 +0100 Commit: michaelni <[email protected]> CommitDate: Tue Nov 17 17:54:46 2026 +0000 avcodec/rawdec: apply the odd dimension I420 fix-up only for even dimensions The layout of such frames with odd dimensions is not known, so do not apply the fix-up to them. Fixes: heap-buffer-overflow (read) Fixes: jviPaxUdJzqk Fixes: ANT-2026-8G1XB01D-poc.avi Found-by: Claude and Ada Logics Out of array read Replicated through UnModified FFmpeg with ASAN --- libavcodec/rawdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 69df3efcaa..c9d708be84 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -428,7 +428,8 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, avctx->codec_tag == MKTAG('Y', 'V', 'U', '9')) FFSWAP(uint8_t *, frame->data[1], frame->data[2]); - if (avctx->codec_tag == AV_RL32("I420") && (avctx->width+1)*(avctx->height+1) * 3/2 == buf_size) { + if (avctx->codec_tag == AV_RL32("I420") && !((avctx->width | avctx->height) & 1) && + (avctx->width+1)*(avctx->height+1) * 3/2 == buf_size) { frame->data[1] = frame->data[1] + (avctx->width+1)*(avctx->height+1) -avctx->width*avctx->height; frame->data[2] = frame->data[2] + ((avctx->width+1)*(avctx->height+1) -avctx->width*avctx->height)*5/4; } -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
