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 403be9561925c011ef0aefc37ceef9c81f0563a3
Author:     Umar Pathan <[email protected]>
AuthorDate: Mon Sep 7 01:06:36 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sat Sep 19 14:27:13 2026 +0200

    avcodec/apac: reset bitstream_index unconditionally to avoid integer 
overflow
    
    Found-by: Umar Pathan (Umar0x)
    Signed-off-by: Umar Pathan <[email protected]>
    
    Fixes: out of array access
    Fixes: signed integer overflow: 2147482624 + 1024 cannot be represented in 
type 'int'
    Fixes: hHqW0dFoQwHN
    (cherry picked from commit e15ddb7f9a2f9b3ab8ac305efb6f94ddc18463d0)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/apac.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/apac.c b/libavcodec/apac.c
index ea3b93359d..c16d19f4d0 100644
--- a/libavcodec/apac.c
+++ b/libavcodec/apac.c
@@ -143,8 +143,9 @@ static int apac_decode(AVCodecContext *avctx, AVFrame 
*frame,
     if ((int64_t)s->bitstream_size + buf_size > INT_MAX / (16 * 8))
         return AVERROR_INVALIDDATA;
 
-    if (s->bitstream_index > 0 && s->bitstream_size > 0) {
-        memmove(s->bitstream, &s->bitstream[s->bitstream_index], 
s->bitstream_size);
+    if (s->bitstream_index > 0) {
+        if (s->bitstream_size > 0)
+            memmove(s->bitstream, &s->bitstream[s->bitstream_index], 
s->bitstream_size);
         s->bitstream_index = 0;
     }
 

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