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 c9b1c355e0 avcodec/librav1e: pass the remaining stats size to 
rav1e_twopass_in()
c9b1c355e0 is described below

commit c9b1c355e008fe8449228ae86f17178b3c32b30c
Author:     Hongduo Zhao <[email protected]>
AuthorDate: Tue Sep 29 01:57:32 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sat Oct 3 21:12:15 2026 +0000

    avcodec/librav1e: pass the remaining stats size to rav1e_twopass_in()
    
    Fixes: heap out of array read in rav1e with a truncated pass-2 log
    Fixes: c2jCdj0i7WcP
    Found-by: Hongduo Zhao
    Replicated through UnModified FFmpeg
---
 libavcodec/librav1e.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/librav1e.c b/libavcodec/librav1e.c
index 0db80830d8..785e9e91ea 100644
--- a/libavcodec/librav1e.c
+++ b/libavcodec/librav1e.c
@@ -161,7 +161,8 @@ static int set_stats(AVCodecContext *avctx)
     int ret = 1;
 
     while (ret > 0 && ctx->pass_size - ctx->pass_pos > 0) {
-        ret = rav1e_twopass_in(ctx->ctx, ctx->pass_data + ctx->pass_pos, 
ctx->pass_size);
+        ret = rav1e_twopass_in(ctx->ctx, ctx->pass_data + ctx->pass_pos,
+                               ctx->pass_size - ctx->pass_pos);
         if (ret < 0)
             return AVERROR_EXTERNAL;
         ctx->pass_pos += ret;

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