Skip to content

Commit

Permalink
crypto: return the retval of HMAC_Update
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tmeisenh authored and italoacasas committed Jan 30, 2017
1 parent a1897c1 commit 6687b95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3693,8 +3693,8 @@ void Hmac::HmacInit(const FunctionCallbackInfo<Value>& args) {
bool Hmac::HmacUpdate(const char* data, int len) {
if (!initialised_)
return false;
HMAC_Update(&ctx_, reinterpret_cast<const unsigned char*>(data), len);
return true;
int r = HMAC_Update(&ctx_, reinterpret_cast<const unsigned char*>(data), len);
return r == 1;
}


Expand Down

0 comments on commit 6687b95

Please sign in to comment.