[vlc-commits] mkv: Ensure we don't use an EbmlDummy element for something it's not

Hugo Beauzée-Luyssen git at videolan.org
Tue Dec 15 11:38:44 UTC 2020


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Sep 18 14:53:15 2020 +0200| [89093b8c033d6dee3d16bebf4a7df6abad4105b8] | committer: Hugo Beauzée-Luyssen

mkv: Ensure we don't use an EbmlDummy element for something it's not

Reported by: Zhen Zhou, NSFOCUS Security

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=89093b8c033d6dee3d16bebf4a7df6abad4105b8
---

 modules/demux/mkv/mkv.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mkv/mkv.hpp b/modules/demux/mkv/mkv.hpp
index 5d8c24603b..048f41532e 100644
--- a/modules/demux/mkv/mkv.hpp
+++ b/modules/demux/mkv/mkv.hpp
@@ -112,7 +112,7 @@ enum
 
 #define MKVD_TIMECODESCALE 1000000
 
-#define MKV_IS_ID( el, C ) ( el != NULL && (el->operator const EbmlId&()) == (C::ClassInfos.ClassId()) )
+#define MKV_IS_ID( el, C ) ( el != NULL && (el->operator const EbmlId&()) == (C::ClassInfos.ClassId()) && !el->IsDummy() )
 #define MKV_CHECKED_PTR_DECL( name, type, src ) type * name = MKV_IS_ID(src, type) ? static_cast<type*>(src) : NULL
 #define MKV_CHECKED_PTR_DECL_CONST( name, type, src ) const type * name = MKV_IS_ID(src, type) ? static_cast<const type*>(src) : NULL
 



More information about the vlc-commits mailing list