[vlc-commits] demux:mkv: fix potential NULL dereference
Steve Lhomme
git at videolan.org
Fri Jan 26 14:27:14 CET 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jan 26 10:03:54 2018 +0100| [4f27287a08a4ffa7d28e9eb5de4c8d124f629ef2] | committer: Jean-Baptiste Kempf
demux:mkv: fix potential NULL dereference
CID #1464407
(cherry picked from commit 314e230244ea0b69aff38657d678067d0127f847)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4f27287a08a4ffa7d28e9eb5de4c8d124f629ef2
---
modules/demux/mkv/Ebml_dispatcher.hpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mkv/Ebml_dispatcher.hpp b/modules/demux/mkv/Ebml_dispatcher.hpp
index a3d39fd862..b50c655c3a 100644
--- a/modules/demux/mkv/Ebml_dispatcher.hpp
+++ b/modules/demux/mkv/Ebml_dispatcher.hpp
@@ -81,6 +81,9 @@ namespace {
bool send (EbmlElement * const& element, void* payload) const
{
+ if ( element == nullptr )
+ return false;
+
EbmlProcessorEntry eb = EbmlProcessorEntry (
static_cast<EbmlId const&> (*element), NULL, NULL
);
@@ -94,7 +97,7 @@ namespace {
_processors.begin(), cit_end, eb
);
- if (element && cit != cit_end)
+ if (cit != cit_end)
{
// --------------------------------------------------------------
// normally we only need to compare the addresses of the EbmlId
More information about the vlc-commits
mailing list