Index: Source/modules/crypto/SubtleCrypto.cpp |
diff --git a/Source/modules/crypto/SubtleCrypto.cpp b/Source/modules/crypto/SubtleCrypto.cpp |
index 608b516c82d583ca7713606ddddbf800a78b3fd5..28a9e6d6cfcdbf5b06b8a7380f6e34c7f58ed06d 100644 |
--- a/Source/modules/crypto/SubtleCrypto.cpp |
+++ b/Source/modules/crypto/SubtleCrypto.cpp |
@@ -125,6 +125,11 @@ ScriptObject SubtleCrypto::importKey(const String& rawFormat, ArrayBufferView* k |
return ScriptObject(); |
} |
+ if (!keyData) { |
+ es.throwDOMException(TypeError); |
+ return ScriptObject(); |
+ } |
+ |
WebKit::WebCryptoKeyUsageMask keyUsages; |
if (!Key::parseUsageMask(rawKeyUsages, keyUsages)) { |
es.throwDOMException(TypeError); |