[vlc-commits] demux: hls: fix segfault on missing key

Francois Cartegnie git at videolan.org
Tue Oct 6 00:22:26 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Oct  6 00:09:09 2015 +0200| [179caf54ff004bf459087e78c2b6741f470e84c8] | committer: Francois Cartegnie

demux: hls: fix segfault on missing key

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

 modules/demux/hls/playlist/HLSSegment.cpp |    1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/demux/hls/playlist/HLSSegment.cpp b/modules/demux/hls/playlist/HLSSegment.cpp
index 4fb4b0f..b5f2a0e 100644
--- a/modules/demux/hls/playlist/HLSSegment.cpp
+++ b/modules/demux/hls/playlist/HLSSegment.cpp
@@ -92,6 +92,7 @@ void HLSSegment::onChunkDownload(block_t **pp_block, SegmentChunk *chunk, BaseRe
             }
 
             if( gcry_cipher_open(&ctx, GCRY_CIPHER_AES, GCRY_CIPHER_MODE_CBC, 0) ||
+                encryption.key.size() != 16 ||
                 gcry_cipher_setkey(ctx, &encryption.key[0], 16) ||
                 gcry_cipher_setiv(ctx, &encryption.iv[0], 16) )
             {



More information about the vlc-commits mailing list