Skip to content

Commit 5ea98fb

Browse files
tmeisenhsam-github
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 33012e9 commit 5ea98fb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/node_crypto.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3690,8 +3690,8 @@ void Hmac::HmacInit(const FunctionCallbackInfo<Value>& args) {
36903690
bool Hmac::HmacUpdate(const char* data, int len) {
36913691
if (!initialised_)
36923692
return false;
3693-
HMAC_Update(&ctx_, reinterpret_cast<const unsigned char*>(data), len);
3694-
return true;
3693+
int r = HMAC_Update(&ctx_, reinterpret_cast<const unsigned char*>(data), len);
3694+
return r == 1;
36953695
}
36963696

36973697

0 commit comments

Comments
 (0)