hlsdemux: Error out if the key is not 16 bytes large
authorSebastian Dröge <sebastian@centricular.com>
Wed, 12 Feb 2014 12:40:41 +0000 (13:40 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 12 Feb 2014 12:40:41 +0000 (13:40 +0100)
ext/hls/gsthlsdemux.c

index 81db8c0efcfc9318f83a8253068bfa824ed77f25..4e06960ee2946e76cad86c869fa853df0c65465a 100644 (file)
@@ -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;