From a84220a65820f4a2d1b1e88a5ea48b3ed1ae8a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 12 Feb 2014 13:40:41 +0100 Subject: [PATCH] hlsdemux: Error out if the key is not 16 bytes large --- ext/hls/gsthlsdemux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index 81db8c0efc..4e06960ee2 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -1367,6 +1367,8 @@ gst_hls_demux_decrypt_fragment (GstHLSDemux * demux, gst_buffer_map (encrypted_buffer, &encrypted_info, GST_MAP_READ); gst_buffer_map (decrypted_buffer, &decrypted_info, GST_MAP_WRITE); + if (key_info.size != 16) + goto decrypt_error; if (!decrypt_fragment (demux, encrypted_info.size, encrypted_info.data, decrypted_info.data, key_info.data, iv)) goto decrypt_error;