Skip to content

Commit c9a92ff

Browse files
tmeisenhMylesBorins
authored andcommitted
crypto: return the retval of HMAC_Update
Fixes coverity scan issue 55489. PR-URL: #10891 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
1 parent d8af5a7 commit c9a92ff

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
@@ -3648,8 +3648,8 @@ void Hmac::HmacInit(const FunctionCallbackInfo<Value>& args) {
36483648
bool Hmac::HmacUpdate(const char* data, int len) {
36493649
if (!initialised_)
36503650
return false;
3651-
HMAC_Update(&ctx_, reinterpret_cast<const unsigned char*>(data), len);
3652-
return true;
3651+
int r = HMAC_Update(&ctx_, reinterpret_cast<const unsigned char*>(data), len);
3652+
return r == 1;
36533653
}
36543654

36553655

0 commit comments

Comments
 (0)