This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit e1ef95c779a3757d21ab970c06aac3e9e1b71974
Author:     Timo Rothenpieler <[email protected]>
AuthorDate: Wed Jul 8 15:19:33 2026 +0200
Commit:     Timo Rothenpieler <[email protected]>
CommitDate: Mon Jul 13 21:13:25 2026 +0200

    avcodec/d3d12va_av1: check size of frame bitstream against available buffer 
size
---
 libavcodec/d3d12va_av1.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/d3d12va_av1.c b/libavcodec/d3d12va_av1.c
index fdc7195d12..a3ddf0495a 100644
--- a/libavcodec/d3d12va_av1.c
+++ b/libavcodec/d3d12va_av1.c
@@ -112,6 +112,7 @@ static int d3d12va_av1_decode_slice(AVCodecContext *avctx,
 
 static int update_input_arguments(AVCodecContext *avctx, 
D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer)
 {
+    D3D12VADecodeContext    *ctx          = D3D12VA_DECODE_CONTEXT(avctx);
     const AV1DecContext     *h            = avctx->priv_data;
     AV1DecodePictureContext *ctx_pic      = 
h->cur_frame.hwaccel_picture_private;
     void *mapped_data;
@@ -121,6 +122,11 @@ static int update_input_arguments(AVCodecContext *avctx, 
D3D12_VIDEO_DECODE_INPU
     args->Size  = sizeof(DXVA_Tile_AV1) * ctx_pic->tile_count;
     args->pData = ctx_pic->tiles;
 
+    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);
+    }
+
     input_args->CompressedBitstream = 
(D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM){
         .pBuffer = buffer,
         .Offset  = 0,

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to