From 2dc99208b06c319d2fca8be0fa5148f2bb665cd9 Mon Sep 17 00:00:00 2001 From: Travis Meisenheimer Date: Wed, 18 Jan 2017 21:36:52 -0600 Subject: [PATCH] crypto: return the retval of HMAC_Update Fixes coverity scan issue 55489. --- src/node_crypto.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index f8436672373a4e..d7df5d3321378e 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -3684,8 +3684,8 @@ void Hmac::HmacInit(const FunctionCallbackInfo& args) { bool Hmac::HmacUpdate(const char* data, int len) { if (!initialised_) return false; - HMAC_Update(&ctx_, reinterpret_cast(data), len); - return true; + int r = HMAC_Update(&ctx_, reinterpret_cast(data), len); + return r == 1; }