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 e15ddb7f9a avcodec/apac: reset bitstream_index unconditionally to
avoid integer overflow
e15ddb7f9a is described below
commit e15ddb7f9a2f9b3ab8ac305efb6f94ddc18463d0
Author: Umar Pathan <[email protected]>
AuthorDate: Mon Sep 7 01:06:36 2026 +0200
Commit: michaelni <[email protected]>
CommitDate: Sat Sep 12 03:36:22 2026 +0000
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
---
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]