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 c348453caed0e59ea4e676140e7d6e9993c67d8a Author: Michael Niedermayer <[email protected]> AuthorDate: Fri Oct 16 23:19:10 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Sun Nov 15 21:19:57 2026 +0100 avcodec/vulkan_decode: limit the slice data of a frame to 2 GiB Not replicated. Fixes: Jdy0O5Qn34O8 Fixes: AISLE-2026-0150-00708 Found-by: Joshua Rogers (AISLE) The report suggested bounding the size and rounding it in 64 bits. (cherry picked from commit 894876ae57960d0881a6d971bb673f6f57829111) Signed-off-by: Michael Niedermayer <[email protected]> --- libavcodec/vulkan_decode.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c index 5cf338b0d3..8c5246f29f 100644 --- a/libavcodec/vulkan_decode.c +++ b/libavcodec/vulkan_decode.c @@ -249,9 +249,11 @@ int ff_vk_decode_add_slice(AVCodecContext *avctx, FFVulkanDecodePicture *vp, uint32_t *slice_off; FFVkBuffer *vkbuf; - size_t new_size = vp->slices_size + startcode_len + size + - ctx->caps.minBitstreamBufferSizeAlignment; + uint64_t new_size = vp->slices_size + startcode_len + size + + ctx->caps.minBitstreamBufferSizeAlignment; new_size = FFALIGN(new_size, ctx->caps.minBitstreamBufferSizeAlignment); + if (new_size > INT32_MAX) + return AVERROR(ENOSYS); if (offsets) { slice_off = av_fast_realloc(dec->slice_off, &dec->slice_off_max, @@ -274,7 +276,7 @@ int ff_vk_decode_add_slice(AVCodecContext *avctx, FFVulkanDecodePicture *vp, /* Align buffer to nearest power of two. Makes fragmentation management * easier, and gives us ample headroom. */ - buf_size = 2 << av_log2(buf_size); + buf_size = 2ULL << av_log2(buf_size); /* When the frames context uses DRM modifier tiling, * hwctx->create_pnext contains VkImageDrmFormatModifierListCreateInfoEXT, -- 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]
