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

Git pushed a commit to branch master
in repository ffmpeg.

commit f703292c421d4193bd87eed646a65d15f83eb884
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Mon Oct 12 02:25:23 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Tue Oct 20 02:25:09 2026 +0000

    avfilter/vf_libopencv: reject shapes too big for OpenCV
    
    Fixes: out of array write
    Fixes: EVA3Y4e693ul
    Found during the review of https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24753
    Out of array write Replicated through UnModified FFmpeg with ASAN
---
 libavfilter/vf_libopencv.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c
index cdfa678860..e34bcb9da7 100644
--- a/libavfilter/vf_libopencv.c
+++ b/libavfilter/vf_libopencv.c
@@ -240,6 +240,12 @@ static int parse_iplconvkernel(IplConvKernel **kernel, 
char *buf, void *log_ctx)
         goto out;
     }
 
+    if (rows > (INT_MAX - sizeof(IplConvKernel) - 32) / sizeof(int) / cols) {
+        av_log(log_ctx, AV_LOG_ERROR, "Shape size %dx%d is too big\n", cols, 
rows);
+        ret = AVERROR(EINVAL);
+        goto out;
+    }
+
     if (anchor_x < 0 || anchor_y < 0 || anchor_x >= cols || anchor_y >= rows) {
         av_log(log_ctx, AV_LOG_ERROR,
                "Shape anchor %dx%d is not inside the rectangle with size 
%dx%d.\n",

-- 
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