mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
crypto: check return code from EVP_DigestUpdate
Coverity was complaining that we did not check the return code. We seem to check in the other place it is called and the method already handles returning a result. Signed-off-by: Michael Dawson <mdawson@devrus.com> PR-URL: https://github.com/nodejs/node/pull/41800 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
This commit is contained in:
1 parent
2efe9cbd01
commit
46f714f92a
1 file changed
+1
-2
@@ -122,8 +122,7 @@ bool Hash::HashInit(const EVP_MD* md, Maybe<unsigned int> 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<Value>& args) {
|
||||
|
||||
Reference in new issue
Block a user