Skip to content

Commit 6687b95

Browse files
tmeisenhitaloacasas
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 a1897c1 commit 6687b95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_crypto.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -3693,8 +3693,8 @@ void Hmac::HmacInit(const FunctionCallbackInfo<Value>& args) {
36933693
bool Hmac::HmacUpdate(const char* data, int len) {
36943694
if (!initialised_)
36953695
return false;
3696-
HMAC_Update(&ctx_, reinterpret_cast<const unsigned char*>(data), len);
3697-
return true;
3696+
int r = HMAC_Update(&ctx_, reinterpret_cast<const unsigned char*>(data), len);
3697+
return r == 1;
36983698
}
36993699

37003700

0 commit comments

Comments
 (0)