Skip to content

Commit

Permalink
src: fix SetClientCertEngine() nullptr dereference
Browse files Browse the repository at this point in the history
Introduced in commit 6ee985f ("tls: implement clientCertEngine
option") which was merged November 11.

PR-URL: #16965
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
bnoordhuis authored and MylesBorins committed Dec 11, 2017
1 parent f6ec5fa commit 7ac760b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,8 @@ void SecureContext::SetClientCertEngine(
CHECK_EQ(args.Length(), 1);
CHECK(args[0]->IsString());

SecureContext* sc = Unwrap<SecureContext>(args.This());
SecureContext* sc;
ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder());

MarkPopErrorOnReturn mark_pop_error_on_return;

Expand Down

0 comments on commit 7ac760b

Please sign in to comment.