From 2f7ef779f26f5e8461f3c91f724c2b8250097a2b Mon Sep 17 00:00:00 2001 From: Burkov Egor Date: Mon, 3 Feb 2025 16:51:30 +0300 Subject: [PATCH] src: Add nullptr handling for `NativeKeyObject` Fixes: #56899 --- src/crypto/crypto_keys.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/crypto/crypto_keys.cc b/src/crypto/crypto_keys.cc index 2c55828facc35bd..2ed52482062ed39 100644 --- a/src/crypto/crypto_keys.cc +++ b/src/crypto/crypto_keys.cc @@ -1063,6 +1063,7 @@ void NativeKeyObject::New(const FunctionCallbackInfo& args) { CHECK_EQ(args.Length(), 1); CHECK(args[0]->IsObject()); KeyObjectHandle* handle = Unwrap(args[0].As()); + CHECK_NOT_NULL(handle); new NativeKeyObject(env, args.This(), handle->Data()); }