[vlc-commits] [Git][videolan/vlc][master] 2 commits: demux: mkv: fix leaking virtual segment on error
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Sep 17 08:20:46 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
11d013a6 by Steve Lhomme at 2025-09-17T07:59:27+00:00
demux: mkv: fix leaking virtual segment on error
Fixes #29289
- - - - -
223e87ef by Steve Lhomme at 2025-09-17T07:59:27+00:00
demux: mkv: fix leak of KaxCodecPrivate
If the element appears twice in the same track, the previous value must be free'd
or properly discarded.
Fixes #29290
- - - - -
2 changed files:
- modules/demux/mkv/demux.cpp
- modules/demux/mkv/matroska_segment_parse.cpp
Changes:
=====================================
modules/demux/mkv/demux.cpp
=====================================
@@ -184,7 +184,10 @@ bool demux_sys_t::PreloadLinked()
return false;
if ( unlikely(p_current_vsegment->CurrentEdition() == NULL) )
+ {
+ delete p_current_vsegment;
return false;
+ }
/* Set current chapter */
msg_Dbg( &demuxer, "NEW START CHAPTER uid=%" PRId64, p_current_vsegment->CurrentChapter() && p_current_vsegment->CurrentChapter()->p_chapter ?
=====================================
modules/demux/mkv/matroska_segment_parse.cpp
=====================================
@@ -377,6 +377,7 @@ void matroska_segment_c::ParseTrackEntry( const KaxTrackEntry *m )
vars.tk->i_extra_data = cpriv.GetSize();
if( vars.tk->i_extra_data > 0 )
{
+ free( vars.tk->p_extra_data );
vars.tk->p_extra_data = static_cast<uint8_t*>( malloc( vars.tk->i_extra_data ) );
if( likely( vars.tk->p_extra_data ) )
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/08d5e641da236a719a3c2d8f6f45af42fa3491bb...223e87ef2623247ace83f281b72f6af9305a22da
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/08d5e641da236a719a3c2d8f6f45af42fa3491bb...223e87ef2623247ace83f281b72f6af9305a22da
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