This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/7.1 in repository ffmpeg.
commit 6b26c4abd2610a83975be92d32cf9d08c2a7984d Author: Timo Rothenpieler <[email protected]> AuthorDate: Thu Jul 9 00:42:38 2026 +0200 Commit: ffmpeg-devel <[email protected]> CommitDate: Sun Jul 19 20:00:59 2026 +0000 avcodec/d3d12va_mpeg2: check size of frame bitstream against available buffer size (cherry picked from commit 26a9f9b3aeb054901b69518223af0d6f4f991fd9) --- libavcodec/d3d12va_mpeg2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/d3d12va_mpeg2.c b/libavcodec/d3d12va_mpeg2.c index 86a7d97b34..44f15dc8d4 100644 --- a/libavcodec/d3d12va_mpeg2.c +++ b/libavcodec/d3d12va_mpeg2.c @@ -87,6 +87,7 @@ static int d3d12va_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buff static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer) { + D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); const MpegEncContext *s = avctx->priv_data; D3D12DecodePictureContext *ctx_pic = s->cur_pic.ptr->hwaccel_picture_private; @@ -102,6 +103,11 @@ static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPU .End = ctx_pic->bitstream_size, }; + if (ctx_pic->bitstream_size > ctx->bitstream_size) { + av_log(avctx, AV_LOG_ERROR, "Input frame bitstream size exceeds internal buffer!\n"); + return AVERROR(EINVAL); + } + if (FAILED(ID3D12Resource_Map(buffer, 0, &range, &mapped_data))) { av_log(avctx, AV_LOG_ERROR, "Failed to map D3D12 Buffer resource!\n"); return AVERROR(EINVAL); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
