This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.1 in repository ffmpeg.
commit 64831aaff1f0b194f3031df4d05aa11c713eecd9 Author: Michael Niedermayer <[email protected]> AuthorDate: Sat Oct 31 05:18:18 2026 +0100 Commit: Michael Niedermayer <[email protected]> CommitDate: Sun Nov 15 02:45:22 2026 +0100 avcodec/bitpacked: check the packet size before using it as a UYVY422 frame Fixes: out of array read Fixes: 2dyV2eNJkKBV Fixes: AISLE-2026-0150-00092 Out of array read Replicated through API with ASAN Found-by: Joshua Rogers (AISLE) (cherry picked from commit f1205ee01893a3b509d96b5fe3aeda755c517973) Signed-off-by: Michael Niedermayer <[email protected]> --- libavcodec/bitpacked_dec.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/bitpacked_dec.c b/libavcodec/bitpacked_dec.c index 8d88c556cc..8afed8f8b2 100644 --- a/libavcodec/bitpacked_dec.c +++ b/libavcodec/bitpacked_dec.c @@ -39,6 +39,13 @@ static int bitpacked_decode_uyvy422(AVCodecContext *avctx, AVFrame *frame, { int ret; + ret = av_image_fill_arrays(frame->data, frame->linesize, avpkt->data, + avctx->pix_fmt, avctx->width, avctx->height, 1); + if (ret < 0) + return ret; + if (ret > avpkt->size) + return AVERROR_INVALIDDATA; + /* there is no need to copy as the data already match * a known pixel format */ frame->buf[0] = av_buffer_ref(avpkt->buf); @@ -46,13 +53,6 @@ static int bitpacked_decode_uyvy422(AVCodecContext *avctx, AVFrame *frame, return AVERROR(ENOMEM); } - ret = av_image_fill_arrays(frame->data, frame->linesize, avpkt->data, - avctx->pix_fmt, avctx->width, avctx->height, 1); - if (ret < 0) { - av_buffer_unref(&frame->buf[0]); - return ret; - } - return 0; } -- 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]
