Index: crypto/encryptor.cc |
diff --git a/crypto/encryptor.cc b/crypto/encryptor.cc |
index 31a7cc830a45d0c4a65de0bfe65262437270793e..984da1fb029f6c3e93f9c05752a9973f2d3a857e 100644 |
--- a/crypto/encryptor.cc |
+++ b/crypto/encryptor.cc |
@@ -66,7 +66,8 @@ bool Encryptor::GenerateCounterMask(size_t plaintext_len, |
const size_t kBlockLength = counter_->GetLengthInBytes(); |
size_t blocks = (plaintext_len + kBlockLength - 1) / kBlockLength; |
- CHECK(blocks); |
+ if (blocks == 0) |
+ return false; |
*mask_len = blocks * kBlockLength; |