Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Unified Diff: media/crypto/aes_decryptor.cc

Issue 11434025: Encrypted Media: Handle empty init_data in AesDecryptor::GenerateKeyRequest(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove KeyMessage in AesDecryptor::GKR() Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/crypto/aes_decryptor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/crypto/aes_decryptor.cc
diff --git a/media/crypto/aes_decryptor.cc b/media/crypto/aes_decryptor.cc
index fb16486104441837edb0b635067279ae88cd952e..88d194ea574f31bca3bf0732957f8d18fb69e247 100644
--- a/media/crypto/aes_decryptor.cc
+++ b/media/crypto/aes_decryptor.cc
@@ -139,6 +139,11 @@ bool AesDecryptor::GenerateKeyRequest(const std::string& key_system,
int init_data_length) {
std::string session_id_string(base::UintToString(next_session_id_++));
+ if (!init_data || !init_data_length) {
+ DVLOG(1) << "init_data required to generate a key request.";
+ return false;
+ }
+
// For now, the AesDecryptor does not care about |key_system| and |type|;
// just fire the event with the |init_data| as the request.
int message_length = init_data_length;
« no previous file with comments | « no previous file | media/crypto/aes_decryptor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698