[vlc-commits] mkv/demux: Ebml_Parser: fix #18001 (memory-leak)
Filip Roséen
git at videolan.org
Fri Mar 3 15:59:46 CET 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Thu Mar 2 17:41:00 2017 +0100| [37fdb03acd3ec85f73edf6741c97b1a05dc4e197] | committer: Jean-Baptiste Kempf
mkv/demux: Ebml_Parser: fix #18001 (memory-leak)
The previous implementation would not free the previous element stored
in the parser stack if an unexpected element is encountered, leading
to a memory-leak.
fixes #18001
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=37fdb03acd3ec85f73edf6741c97b1a05dc4e197
---
modules/demux/mkv/Ebml_parser.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/demux/mkv/Ebml_parser.cpp b/modules/demux/mkv/Ebml_parser.cpp
index 4e16c4b..c937a99 100644
--- a/modules/demux/mkv/Ebml_parser.cpp
+++ b/modules/demux/mkv/Ebml_parser.cpp
@@ -253,6 +253,8 @@ EbmlElement *EbmlParser::Get( int n_call )
}
delete m_el[mi_level];
+ delete p_prev;
+
m_el[mi_level] = NULL;
m_el[mi_level - 1]->SkipData( *m_es, EBML_CONTEXT(m_el[mi_level - 1]) );
return Get();
More information about the vlc-commits
mailing list