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

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

commit e22bdd9e04730b10401e3877c43601779f6a93f9
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Jun 4 21:42:47 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Jun 14 04:59:11 2026 +0200

    avcodec/adpcm: fix signed integer overflow in get_nb_samples()
    
    Fixes: signed integer overflow: 314572800 * 8 cannot be represented in type 
'int'
    
    Tighten the guard to INT_MAX/14, which covers the largest expansion
    factor used in the function currently.
    
    Found-by: Jiale Yao <[email protected]>
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit 04e2341056bc6f280d93810fd000e057bee0d3a4)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/adpcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 49d4c6dd6f..53685a4931 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -1037,7 +1037,7 @@ static int get_nb_samples(AVCodecContext *avctx, 
GetByteContext *gb,
 
     if(ch <= 0)
         return 0;
-    if (buf_size > INT_MAX / 2)
+    if (buf_size > INT_MAX / 14)
         return 0;
 
     switch (avctx->codec->id) {

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

Reply via email to