This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 8b447a670ac420eba5115348d6cbfe42279a21bc Author: Lynne <[email protected]> AuthorDate: Fri Feb 13 15:11:33 2026 +0100 Commit: Lynne <[email protected]> CommitDate: Thu Feb 19 19:42:27 2026 +0100 vulkan/dpx: bounds check with image sizes Prevents out of bounds accesses. --- libavcodec/vulkan/dpx_copy.comp.glsl | 5 ++++- libavcodec/vulkan/dpx_unpack.comp.glsl | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libavcodec/vulkan/dpx_copy.comp.glsl b/libavcodec/vulkan/dpx_copy.comp.glsl index f106195182..f83b03d6a0 100644 --- a/libavcodec/vulkan/dpx_copy.comp.glsl +++ b/libavcodec/vulkan/dpx_copy.comp.glsl @@ -69,9 +69,12 @@ uint read_data(uint off) void main(void) { ivec2 pos = ivec2(gl_GlobalInvocationID.xy); + ivec2 size = imageSize(dst[0]); + if (any(greaterThanEqual(pos, size))) + return; uint linesize; - linesize = align(imageSize(dst[0]).x*bits_per_comp*nb_comp, 32); + linesize = align(size.x*bits_per_comp*nb_comp, 32); uint offs = pos.y*linesize + pos.x*nb_comp*bits_per_comp; offs /= bits_per_comp; diff --git a/libavcodec/vulkan/dpx_unpack.comp.glsl b/libavcodec/vulkan/dpx_unpack.comp.glsl index badc48a52a..ed6959a904 100644 --- a/libavcodec/vulkan/dpx_unpack.comp.glsl +++ b/libavcodec/vulkan/dpx_unpack.comp.glsl @@ -90,14 +90,15 @@ i16vec4 parse_packed_in_32(ivec2 pos, int stride) void main(void) { ivec2 pos = ivec2(gl_GlobalInvocationID.xy); - if (any(greaterThanEqual(pos, imageSize(dst[0])))) + ivec2 size = imageSize(dst[0]); + if (any(greaterThanEqual(pos, size))) return; i16vec4 p; if (packed_10bit) - p = parse_packed10_in_32(pos, imageSize(dst[0]).x); + p = parse_packed10_in_32(pos, size.x); else - p = parse_packed_in_32(pos, imageSize(dst[0]).x); + p = parse_packed_in_32(pos, size.x); if (nb_images == 1) { imageStore(dst[0], pos, p); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
