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 cbd2878853cf851dbf643cd47ee35ceb683dd62e
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Mon Jun 29 01:35:05 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sat Sep 19 14:26:48 2026 +0200

    avformat/movenc: free sgpd_entries on the roll-distance error path
    
    Found-by: Ao Xijie
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit b553b810c460e484f70a7368ed7abbdcecbe845b)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/movenc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index cc9f9f229a..9c49e3e74a 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3310,8 +3310,10 @@ static int mov_preroll_write_stbl_atoms(AVIOContext *pb, 
MOVTrack *track)
             if (roll_samples_remaining > 0)
                 distance = 0;
             /* Verify distance is a maximum of 32 (2.5ms) packets. */
-            if (distance > 32)
+            if (distance > 32) {
+                av_freep(&sgpd_entries);
                 return AVERROR_INVALIDDATA;
+            }
             if (i && distance == sgpd_entries[entries].roll_distance) {
                 sgpd_entries[entries].count++;
             } else {

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