Skip to content

Commit 0a8e474

Browse files
wooffieRafaelGSS
authored andcommitted
src: add nullptr handling for NativeKeyObject
Fixes: #56899 PR-URL: #56900 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Filip Skokan <[email protected]>
1 parent 2244a27 commit 0a8e474

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/crypto/crypto_keys.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,7 @@ void NativeKeyObject::New(const FunctionCallbackInfo<Value>& args) {
10661066
CHECK_EQ(args.Length(), 1);
10671067
CHECK(args[0]->IsObject());
10681068
KeyObjectHandle* handle = Unwrap<KeyObjectHandle>(args[0].As<Object>());
1069+
CHECK_NOT_NULL(handle);
10691070
new NativeKeyObject(env, args.This(), handle->Data());
10701071
}
10711072

0 commit comments

Comments
 (0)