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

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

commit 849ed5f176fa5c008cbfc63f346d662f1a22a1f9
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Jun 4 21:42:47 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Jun 14 04:41:05 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 6ff3dad613..74af2cb4d3 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -1174,7 +1174,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