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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 04e2341056 avcodec/adpcm: fix signed integer overflow in 
get_nb_samples()
04e2341056 is described below

commit 04e2341056bc6f280d93810fd000e057bee0d3a4
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Jun 4 21:42:47 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sun Jun 7 02:57:25 2026 +0000

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