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

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

The following commit(s) were added to refs/heads/release/9.1 by this push:
     new b2efecda3d avformat/cafdec: reject out of range priming and remainder 
frames
b2efecda3d is described below

commit b2efecda3dee39d2c66c6600ee2852961a103761
Author:     Baptiste Coudurier <[email protected]>
AuthorDate: Sat Nov 21 15:55:40 2026 -0800
Commit:     ffmpeg-devel <[email protected]>
CommitDate: Fri Nov 27 14:47:51 2026 +0000

    avformat/cafdec: reject out of range priming and remainder frames
    
    Both are SInt32; larger values made initial_padding negative.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Signed-off-by: Baptiste Coudurier <[email protected]>
    (cherry picked from commit 359c82515228774eb683dffce9d623b6b4a2fa53)
---
 libavformat/cafdec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index fae4d7db5e..ed86c09243 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -277,7 +277,9 @@ static int read_pakt_chunk(AVFormatContext *s, int64_t size)
     st->nb_frames  = avio_rb64(pb); /* valid frames */
     priming        = avio_rb32(pb); /* priming frames */
     caf->remainder = avio_rb32(pb); /* remainder frames */
-    if (st->nb_frames < 0 || INT64_MAX - priming - caf->remainder < 
st->nb_frames)
+    /* both are SInt32 */
+    if (priming > INT32_MAX || caf->remainder > INT32_MAX ||
+        st->nb_frames < 0 || INT64_MAX - priming - caf->remainder < 
st->nb_frames)
         return AVERROR_INVALIDDATA;
 
     caf->frame_cnt = -(int64_t)priming;

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