Index: base/crypto/encryptor_win.cc |
diff --git a/base/crypto/encryptor_win.cc b/base/crypto/encryptor_win.cc |
index fe1f5a8e7dca0cdd705d6a4838ad28cc606f1444..4a137b306dbe283f71c98decab64aa29fecdbd7e 100644 |
--- a/base/crypto/encryptor_win.cc |
+++ b/base/crypto/encryptor_win.cc |
@@ -93,6 +93,8 @@ bool Encryptor::Encrypt(const std::string& plaintext, std::string* ciphertext) { |
bool Encryptor::Decrypt(const std::string& ciphertext, std::string* plaintext) { |
DWORD data_len = ciphertext.size(); |
+ if (data_len == 0) |
+ return false; |
std::vector<BYTE> tmp(data_len); |
memcpy(&tmp[0], ciphertext.data(), data_len); |