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>
v6
Travis Meisenheimer 8 years ago
committed by Sam Roberts
parent
commit
5ea98fb17d
  1. 4
      src/node_crypto.cc

4
src/node_crypto.cc

@ -3690,8 +3690,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