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 77e1a6f913577e7525d097c49ea96193c9cd4629
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Nov 3 02:15:31 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Nov 15 02:43:28 2026 +0100

    avcodec/apedec: reject legacy frames with more than 73728 samples
    
    Excessive memory allocation (peak RSS 2.58 GB from a 52 byte file)
    Replicated through UnModified FFmpeg with ASAN
    
    Fixes: out of memory
    Fixes: 2cNjGsVIMOVX
    Fixes: AISLE-2026-0150-00053
    
    Found-by: Joshua Rogers (AISLE)
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit 968e9e948ed8c9ba90dbc875e60b843c755cf4ba)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/apedec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 9a184f9807..466c3c2001 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -1598,7 +1598,8 @@ static int ape_decode_frame(AVCodecContext *avctx, 
AVFrame *frame,
                 skip_bits_long(&s->gb, offset);
         }
 
-        if (!nblocks || nblocks > INT_MAX / 2 / sizeof(*s->decoded_buffer) - 
8) {
+        if (!nblocks || nblocks > INT_MAX / 2 / sizeof(*s->decoded_buffer) - 8 
||
+            (s->fileversion < 3930 && nblocks > 73728)) {
             av_log(avctx, AV_LOG_ERROR, "Invalid sample count: %"PRIu32".\n",
                    nblocks);
             return AVERROR_INVALIDDATA;

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