diff --git a/src/crypto/crypto_hash.cc b/src/crypto/crypto_hash.cc index e4c4fc61815a1f..9aa9c604da7dc1 100644 --- a/src/crypto/crypto_hash.cc +++ b/src/crypto/crypto_hash.cc @@ -122,8 +122,7 @@ bool Hash::HashInit(const EVP_MD* md, Maybe xof_md_len) { bool Hash::HashUpdate(const char* data, size_t len) { if (!mdctx_) return false; - EVP_DigestUpdate(mdctx_.get(), data, len); - return true; + return EVP_DigestUpdate(mdctx_.get(), data, len) == 1; } void Hash::HashUpdate(const FunctionCallbackInfo& args) {