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

Git pushed a commit to branch master
in repository ffmpeg.

commit d09971584b8444d79ee7d5b803a7510e0d3a6ce0
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sat Sep 26 04:24:42 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sun Oct 11 00:53:40 2026 +0000

    avfilter/vsrc_life: reject grids whose cell count does not fit in an int
    
    Fixes: heap-buffer-overflow
    Fixes: signed integer overflow
    Fixes: WY5AA7zfuNDv
    Found-by: Hongduo Zhao
---
 libavfilter/vsrc_life.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c
index 1a5a1408d5..65dc70d20b 100644
--- a/libavfilter/vsrc_life.c
+++ b/libavfilter/vsrc_life.c
@@ -215,7 +215,10 @@ static void fill_picture_rgb(AVFilterContext *ctx, AVFrame 
*picref)
 static int alloc_grid(AVFilterContext *ctx)
 {
     LifeContext *life = ctx->priv;
-
+    if (life->w <= 0 || life->h <= 0 || life->w > INT_MAX / life->h) {
+        av_log(ctx, AV_LOG_ERROR, "Invalid grid size %dx%d\n", life->w, 
life->h);
+        return AVERROR(EINVAL);
+    }
     if (!(life->buf[0] = av_calloc(life->h * life->w, sizeof(*life->buf[0]))) 
||
         !(life->buf[1] = av_calloc(life->h * life->w, sizeof(*life->buf[1])))) 
{
         av_freep(&life->buf[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