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

Git pushed a commit to branch release/6.1
in repository ffmpeg.

commit fcf2dcead136f4baf227859f55b78d537d501ea8
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sun May 31 19:50:37 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Jun 14 19:38:57 2026 +0200

    avcodec/aac/aacdec: reject decoded frame without a valid sample rate
    
    Later code will turn this into AVERROR_BUG
    
    When returning sample_rate == 0 samples is considered a bug, we have no
    nice choice but to error out cleanly
    
    Fixes: assertion failure
    Fixes: ffmpeg_AV_CODEC_ID_AAC_DEC_fuzzer 
crash-0a86d46fef2442b222ee34403c21f7f582ffccb0
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit e711e608273e0d7d195d2cb1912fb06d0772d96c)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/aacdec_template.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index eaa2e973cc..1e3ba4e510 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -3316,6 +3316,12 @@ static int aac_decode_frame_int(AVCodecContext *avctx, 
AVFrame *frame,
         ac->oc[1].status = OC_LOCKED;
     }
 
+    if (samples && avctx->sample_rate <= 0) {
+        av_log(avctx, AV_LOG_ERROR,
+               "Cannot output a frame without a valid sample rate\n");
+        return AVERROR_INVALIDDATA;
+    }
+
     if (!ac->frame->data[0] && samples) {
         av_log(avctx, AV_LOG_ERROR, "no frame data found\n");
         err = AVERROR_INVALIDDATA;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to