[vlc-commits] demux: hls: fix null deref warning (cid #1405538)
Francois Cartegnie
git at videolan.org
Fri Apr 28 10:36:50 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Apr 28 10:36:04 2017 +0200| [075bc7169b05b004fa0250e4a4ce5516b05487a9] | committer: Francois Cartegnie
demux: hls: fix null deref warning (cid #1405538)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=075bc7169b05b004fa0250e4a4ce5516b05487a9
---
modules/demux/hls/playlist/Parser.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp
index 9ae82072b3..d458ada1f6 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -310,7 +310,8 @@ void M3U8Parser::parseSegments(vlc_object_t *, Representation *rep, const std::l
}
M3U8 *m3u8 = dynamic_cast<M3U8 *>(rep->getPlaylist());
- encryption.key = m3u8->getEncryptionKey(keyurl.toString());
+ if(likely(m3u8))
+ encryption.key = m3u8->getEncryptionKey(keyurl.toString());
if(keytag->getAttributeByName("IV"))
{
encryption.iv.clear();
More information about the vlc-commits
mailing list