Browse Source

crypto: return the retval of HMAC_Update

Fixes coverity scan issue 55489.

PR-URL: https://github.com/nodejs/node/pull/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>
v4.x
Travis Meisenheimer 8 years ago
committed by Myles Borins
parent
commit
c9a92ff494
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 4
      src/node_crypto.cc

4
src/node_crypto.cc

@ -3648,8 +3648,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;
}

Loading…
Cancel
Save