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 c1906a1d891ba8750774562f7ff38ce32afd1df8 Author: zhang xingxing <[email protected]> AuthorDate: Mon Sep 21 06:14:25 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Sat Nov 14 05:13:59 2026 +0100 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 (cherry picked from commit bd9ff7730625567c423f3aa3ea847e1f0f448b17) Signed-off-by: Michael Niedermayer <[email protected]> --- libavfilter/vf_libopencv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c index 018741a9ab..54cd951ceb 100644 --- a/libavfilter/vf_libopencv.c +++ b/libavfilter/vf_libopencv.c @@ -164,6 +164,11 @@ static int read_shape_from_file(int *cols, int *rows, int **values, const char * ret = AVERROR_INVALIDDATA; goto end; } + 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]
