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 959b20e81309a49d846c21ac2ed4c1c8a4963bd2
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Wed Nov 11 05:09:41 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Nov 15 21:19:57 2026 +0100

    avcodec/ttaenc: reject sample rates the frame size computation overflows 
with
    
    The decoder rejects the same sample rates.
    
    Fixes: signed integer overflow: 256 * 9000000 cannot be represented in type 
'int'
    Fixes: LbmS1VxBslMA
    
    Found during the triage of a finding from the review of 
https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25694
    
    Signed integer overflow Replicated through UnModified FFmpeg with UBSAN
    
    (cherry picked from commit 7d871d13196b3101445416caa6ee9f611793cccc)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/ttaenc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/ttaenc.c b/libavcodec/ttaenc.c
index 4bef53a20f..00936863a8 100644
--- a/libavcodec/ttaenc.c
+++ b/libavcodec/ttaenc.c
@@ -54,6 +54,11 @@ static av_cold int tta_encode_init(AVCodecContext *avctx)
         avctx->bits_per_raw_sample = 24;
     }
 
+    if (avctx->sample_rate > 0x7FFFFF) {
+        av_log(avctx, AV_LOG_ERROR, "sample_rate too large\n");
+        return AVERROR(EINVAL);
+    }
+
     s->bps = avctx->bits_per_raw_sample >> 3;
     avctx->frame_size = 256 * avctx->sample_rate / 245;
 

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