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 d35e13b9e0 avformat/mov: fix memleak when spherical info is parsed 
more than once
d35e13b9e0 is described below

commit d35e13b9e05cc20f48373f88e399c8ef0c16fc61
Author:     Sathvik Prabhu <[email protected]>
AuthorDate: Wed Oct 21 03:55:50 2026 +0530
Commit:     michaelni <[email protected]>
CommitDate: Mon Nov 16 06:10:44 2026 +0000

    avformat/mov: fix memleak when spherical info is parsed more than once
    
    mov_read_sv3d() and mov_read_vexu_proj() unconditionally assign
    sc->spherical, leaking the previous allocation when a sample
    description contains both an sv3d box and a vexu box with a proj
    child, as in spherical-vexu-orientation.mp4 from the FATE suite.
    
    Free any existing structure before allocating a new one. The last
    box still wins, as before.
    
    Signed-off-by: Sathvik Prabhu <[email protected]>
---
 libavformat/mov.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index f35334b064..eba7619ed1 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7367,6 +7367,7 @@ static int mov_read_sv3d(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
         return 0;
     }
 
+    av_freep(&sc->spherical);
     sc->spherical = av_spherical_alloc(&sc->spherical_size);
     if (!sc->spherical)
         return AVERROR(ENOMEM);
@@ -7451,6 +7452,7 @@ static int mov_read_vexu_proj(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
         return AVERROR_INVALIDDATA;
     }
 
+    av_freep(&sc->spherical);
     sc->spherical = av_spherical_alloc(&sc->spherical_size);
     if (!sc->spherical)
         return AVERROR(ENOMEM);

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