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

Git pushed a commit to branch master
in repository ffmpeg.

commit bd9ff7730625567c423f3aa3ea847e1f0f448b17
Author:     zhang xingxing <[email protected]>
AuthorDate: Mon Sep 21 06:14:25 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Mon Sep 28 15:24:01 2026 +0000

    avfilter/vf_libopencv: reject custom shape files without columns
    
    Fixes: division by 0
    Fixes: 4MBWdnTTajBU
    Fixes: 
swarm-Division-by-zero-when-shape-file-has-no-non-newline-columns-059deb
---
 libavfilter/vf_libopencv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c
index 5985262966..5552fab1b8 100644
--- a/libavfilter/vf_libopencv.c
+++ b/libavfilter/vf_libopencv.c
@@ -154,6 +154,11 @@ static int read_shape_from_file(int *cols, int *rows, int 
**values, const char *
         }
         w++;
     }
+    if (*cols == 0) {
+        av_log(log_ctx, AV_LOG_ERROR, "No columns in the shape file\n");
+        ret = AVERROR_INVALIDDATA;
+        goto end;
+    }
     if (*rows > (SIZE_MAX / sizeof(int) / *cols)) {
         av_log(log_ctx, AV_LOG_ERROR, "File with size %dx%d is too big\n",
                *rows, *cols);

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