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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 8b34c36e61 vulkan/dpx: Fix int overflow
8b34c36e61 is described below

commit 8b34c36e61ed6617cfb3bcd3f6bc0104e77c7b73
Author:     Maxime Gervais <[email protected]>
AuthorDate: Thu Sep 17 21:16:41 2026 +0200
Commit:     Lynne <[email protected]>
CommitDate: Tue Sep 22 12:22:58 2026 +0000

    vulkan/dpx: Fix int overflow
    
    Signed-off-by: Maxime Gervais <[email protected]>
---
 libavcodec/vulkan/dpx_copy.comp.glsl   | 6 ++++--
 libavcodec/vulkan/dpx_unpack.comp.glsl | 3 +--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/libavcodec/vulkan/dpx_copy.comp.glsl 
b/libavcodec/vulkan/dpx_copy.comp.glsl
index 124caea494..e42b87c32d 100644
--- a/libavcodec/vulkan/dpx_copy.comp.glsl
+++ b/libavcodec/vulkan/dpx_copy.comp.glsl
@@ -76,8 +76,10 @@ void main(void)
     uint linesize;
     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;
+    /* The offset must be computed in 64 bits as pos.y*linesize can exceed
+       UINT32_MAX for large frames */
+    uint offs = uint((U64(pos.y)*linesize + pos.x*nb_comp*bits_per_comp)
+                     / bits_per_comp);
 
     if (nb_images == 1) {
         uvec4 val;
diff --git a/libavcodec/vulkan/dpx_unpack.comp.glsl 
b/libavcodec/vulkan/dpx_unpack.comp.glsl
index e169ac07aa..b4b754294e 100644
--- a/libavcodec/vulkan/dpx_unpack.comp.glsl
+++ b/libavcodec/vulkan/dpx_unpack.comp.glsl
@@ -68,10 +68,9 @@ i16vec4 parse_packed_in_32(ivec2 pos, int stride)
     line_size += line_size & 31;
     line_size += need_align << 3;
 
-    uint line_off = pos.y*line_size;
     uint pix_off = pos.x*bits_per_comp*nb_comp;
 
-    uint off = (line_off + pix_off) >> 5;
+    uint off = uint((U64(pos.y)*line_size + pix_off) >> 5);
     uint bit = pix_off & 0x1f;
 
     uint32_t d0 = read_data(off + 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]

Reply via email to