[vlc-commits] [Git][videolan/vlc][3.0.x] 3 commits: demux: ogg: fix leak on xiph_AppendHeaders error

Tristan Matthews (@tmatth) gitlab at videolan.org
Fri Nov 14 18:49:34 UTC 2025



Tristan Matthews pushed to branch 3.0.x at VideoLAN / VLC


Commits:
67358978 by Tristan Matthews at 2025-11-14T18:34:35+00:00
demux: ogg: fix leak on xiph_AppendHeaders error

Fixes #29448
Fixes https://issues.oss-fuzz.com/issues/456426262

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/vlc
(cherry picked from commit c10dde079c65799a58307fb6f23ee18275f0363f)

- - - - -
20f35cc4 by Tristan Matthews at 2025-11-14T18:34:35+00:00
codec: theora: fix leak on xiph_AppendHeaders error

(cherry picked from commit e18f719aca1e9aabb3f97457a3a0ca6e7f64b9c7)

- - - - -
02102a88 by Tristan Matthews at 2025-11-14T18:34:35+00:00
codec: vorbis: fix leak on xiph_AppendHeaders error

(cherry picked from commit 1efee9cd4463bc62e359cd5f43e1a560d4f3c292)

- - - - -


3 changed files:

- modules/codec/theora.c
- modules/codec/vorbis.c
- modules/demux/ogg.c


Changes:

=====================================
modules/codec/theora.c
=====================================
@@ -800,6 +800,7 @@ static int OpenEncoder( vlc_object_t *p_this )
         if( xiph_AppendHeaders( &p_enc->fmt_out.i_extra, &p_enc->fmt_out.p_extra,
                                 header.bytes, header.packet ) )
         {
+            free(p_enc->fmt_out.p_extra);
             p_enc->fmt_out.i_extra = 0;
             p_enc->fmt_out.p_extra = NULL;
         }


=====================================
modules/codec/vorbis.c
=====================================
@@ -862,6 +862,7 @@ static int OpenEncoder( vlc_object_t *p_this )
         if( xiph_AppendHeaders( &p_enc->fmt_out.i_extra, &p_enc->fmt_out.p_extra,
                                 header[i].bytes, header[i].packet ) )
         {
+            free(p_enc->fmt_out.p_extra);
             p_enc->fmt_out.i_extra = 0;
             p_enc->fmt_out.p_extra = NULL;
         }


=====================================
modules/demux/ogg.c
=====================================
@@ -1362,6 +1362,7 @@ static void Ogg_DecodePacket( demux_t *p_demux,
         else if( xiph_AppendHeaders( &p_stream->i_headers, &p_stream->p_headers,
                                      p_oggpacket->bytes, p_oggpacket->packet ) )
         {
+            free(p_stream->p_headers);
             p_stream->i_headers = 0;
             p_stream->p_headers = NULL;
         }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a9d5a66e458565305d21831b5061baf19543170a...02102a889082ffb3b5dff4710a7c3475923b79e1

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a9d5a66e458565305d21831b5061baf19543170a...02102a889082ffb3b5dff4710a7c3475923b79e1
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list