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

Git pushed a commit to branch master
in repository ffmpeg.

commit 801081347027088f8fc78caf17f79ef571cf4da5
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Oct 13 07:10:58 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Wed Oct 28 21:08:03 2026 +0000

    avcodec/decode: do not allocate the LCEVC base picture smaller than the base
    
    The reporter's patch rejected such enhanced dimensions instead.
    
    Fixes: out of array write
    Fixes: zKsYtIUkExUC
    
    Found-by: Ayoub Nabil Boubagrat 
<[email protected]>
    
    Out of array write Replicated through UnModified FFmpeg with ASAN
    
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/decode.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index d0e20c3637..57baaad15b 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1669,14 +1669,14 @@ int ff_decode_frame_props(AVCodecContext *avctx, 
AVFrame *frame)
         if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE))
             return ret;
 
-        // force get_buffer2() to allocate the base frame using the same 
dimensions
-        // as the final enhanced frame, in order to prevent reinitializing the 
buffer
+        // force get_buffer2() to allocate the base frame with at least the 
dimensions
+        // of the final enhanced frame, in order to prevent reinitializing the 
buffer
         // pools unnecessarely
         if (!ret && dc->lcevc.width && dc->lcevc.height) {
             dc->lcevc.base_width  = frame->width;
             dc->lcevc.base_height = frame->height;
-            frame->width  = dc->lcevc.width;
-            frame->height = dc->lcevc.height;
+            frame->width  = FFMAX(frame->width,  dc->lcevc.width);
+            frame->height = FFMAX(frame->height, dc->lcevc.height);
         } else
             dc->lcevc.frame = 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