[vlc-commits] [Git][videolan/vlc][3.0.x] demux/mkv: fix header leak on error

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Aug 21 08:11:30 UTC 2025



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
285ab70a by Steve Lhomme at 2025-08-21T07:52:46+00:00
demux/mkv: fix header leak on error

Fixes https://code.videolan.org/videolan/vlc/-/issues/29044

(cherry picked from commit e6ea9b6049faa430dab97d3c657cc9cfa2f3fa1f)

- - - - -


1 changed file:

- modules/demux/mkv/demux.cpp


Changes:

=====================================
modules/demux/mkv/demux.cpp
=====================================
@@ -480,6 +480,7 @@ bool demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, matroska_stream_c *
     if (std::string(doc_type) != "matroska" && std::string(doc_type) != "webm" )
     {
         msg_Err( p_demux, "Not a Matroska file : DocType = %s ", std::string(doc_type).c_str());
+        delete p_l0;
         return false;
     }
 
@@ -487,6 +488,7 @@ bool demux_sys_t::AnalyseAllSegmentsFound( demux_t *p_demux, matroska_stream_c *
     if (uint64(doc_read_version) > 5)
     {
         msg_Err( p_demux, "matroska file needs version %" PRId64 " but only versions 1 to 4 supported", uint64(doc_read_version));
+        delete p_l0;
         return false;
     }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/285ab70a5aba325f39f0adf4c8272a7fac7e98ca

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/285ab70a5aba325f39f0adf4c8272a7fac7e98ca
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