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

Git pushed a commit to branch master
in repository ffmpeg.

commit cfe6a6cd7de59341a70ebe6a2d477f3281aec834
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Fri Oct 30 19:31:36 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Thu Nov 5 23:01:56 2026 +0000

    avcodec/pcm-dvdenc: do not encode a frame with fewer samples than a block
    
    24 bit samples are stored in blocks of samples_per_block samples
    and the sample count of a frame is rounded down to whole blocks. A last
    frame with fewer samples than a block gives zero blocks, the do/while
    loops still run and read past the frame until the block count wraps.
    
    Return no packet for such a frame.
    
    Fixes: out of array read
    Fixes: ZplUzGvg2XP9
    Fixes: AISLE-2026-0150-00112
    Out of array read Replicated through UnModified FFmpeg with ASAN
    
    Found-by: Joshua Rogers (AISLE)
---
 libavcodec/pcm-dvdenc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/pcm-dvdenc.c b/libavcodec/pcm-dvdenc.c
index 4904eea4ca..dc5224cc24 100644
--- a/libavcodec/pcm-dvdenc.c
+++ b/libavcodec/pcm-dvdenc.c
@@ -123,6 +123,9 @@ static int pcm_dvd_encode_frame(AVCodecContext *avctx, 
AVPacket *avpkt,
     PutByteContext pb;
     int ret;
 
+    if (!blocks)
+        return 0;
+
     if ((ret = ff_get_encode_buffer(avctx, avpkt, pkt_size, 0)) < 0)
         return 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