[vlc-devel] [PATCH 4/7] demux:mkv: do not try to use p_prev if it's already free'd

Steve Lhomme robux4 at videolabs.io
Mon Nov 13 18:08:43 CET 2017


---
 modules/demux/mkv/Ebml_parser.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/demux/mkv/Ebml_parser.cpp b/modules/demux/mkv/Ebml_parser.cpp
index 489ff67355..e22e68c5e6 100644
--- a/modules/demux/mkv/Ebml_parser.cpp
+++ b/modules/demux/mkv/Ebml_parser.cpp
@@ -178,6 +178,7 @@ EbmlElement *EbmlParser::Get( int n_call )
                 if( MKV_IS_ID( p_prev, KaxBlockVirtual ) )
                     static_cast<KaxBlockVirtualWorkaround*>(p_prev)->Fix(); // !! WARNING : TODO !! this is undefined-behavior
                 delete p_prev;
+                p_prev = NULL;
             }
             mb_keep = false;
         }
-- 
2.14.2



More information about the vlc-devel mailing list