Skip to content

Commit b662c11

Browse files
tmeisenhMylesBorins
authored andcommitted
crypto: return the retval of HMAC_Update
Fixes coverity scan issue 55489. PR-URL: #10891 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Brian White <[email protected]>
1 parent 0c60540 commit b662c11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_crypto.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3728,8 +3728,8 @@ void Hmac::HmacInit(const FunctionCallbackInfo<Value>& args) {
37283728
bool Hmac::HmacUpdate(const char* data, int len) {
37293729
if (!initialised_)
37303730
return false;
3731-
HMAC_Update(&ctx_, reinterpret_cast<const unsigned char*>(data), len);
3732-
return true;
3731+
int r = HMAC_Update(&ctx_, reinterpret_cast<const unsigned char*>(data), len);
3732+
return r == 1;
37333733
}
37343734

37353735

0 commit comments

Comments
 (0)