diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 5690085123855e..739c52f46e216d 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -4648,6 +4648,8 @@ void Verify::VerifyFinal(const FunctionCallbackInfo& args) { unsigned int offset = 0; ManagedEVPPKey pkey = GetPublicOrPrivateKeyFromJs(args, &offset, true); + if (!pkey) + return; char* hbuf = Buffer::Data(args[offset]); ssize_t hlen = Buffer::Length(args[offset]);