Merge pull request #22480 from grpc/aschleck/master

Make check_call_host not segfault when overridden_target_name_ is null
pull/22487/head
ZhenLian 5 years ago committed by GitHub
commit 69c5657308
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/core/lib/security/security_connector/ssl/ssl_security_connector.cc

@ -190,9 +190,10 @@ class grpc_ssl_channel_security_connector final
grpc_auth_context* auth_context, grpc_auth_context* auth_context,
grpc_closure* /*on_call_host_checked*/, grpc_closure* /*on_call_host_checked*/,
grpc_error** error) override { grpc_error** error) override {
return grpc_ssl_check_call_host(host, target_name_.get(), return grpc_ssl_check_call_host(
overridden_target_name_.get(), auth_context, host, target_name_.get(),
error); overridden_target_name_ != nullptr ? overridden_target_name_.get() : "",
auth_context, error);
} }
void cancel_check_call_host(grpc_closure* /*on_call_host_checked*/, void cancel_check_call_host(grpc_closure* /*on_call_host_checked*/,

Loading…
Cancel
Save