aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-07 09:33:41 -0800
committerGravatar GitHub <noreply@github.com>2017-11-07 09:33:41 -0800
commit5d3b03f87ac68aa6a1b89b38237fd42761734782 (patch)
treeb4d7ccae45972ebada4a6b3814de0d9d322129f3 /src/core/lib
parent4cd04b3cd0833e97fc6a65ede8653961a0cf52a3 (diff)
parent240256fd2497d7ce03f38db5c399466e1bb25d37 (diff)
Merge pull request #13286 from yashykt/13235fix
Forward fix for PR #13235. Perform strcmp only when not NULL
Diffstat (limited to 'src/core/lib')
-rw-r--r--src/core/lib/security/transport/client_auth_filter.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lib/security/transport/client_auth_filter.cc b/src/core/lib/security/transport/client_auth_filter.cc
index 8f7530ed27..11f5a13ccc 100644
--- a/src/core/lib/security/transport/client_auth_filter.cc
+++ b/src/core/lib/security/transport/client_auth_filter.cc
@@ -139,7 +139,7 @@ void grpc_auth_metadata_context_build(
method_name = gpr_strdup(last_slash + 1);
}
char* host_and_port = grpc_slice_to_c_string(call_host);
- if (strcmp(url_scheme, GRPC_SSL_URL_SCHEME) == 0) {
+ if (url_scheme != NULL && strcmp(url_scheme, GRPC_SSL_URL_SCHEME) == 0) {
/* Remove the port if it is 443. */
char* port_delimiter = strrchr(host_and_port, ':');
if (port_delimiter != NULL && strcmp(port_delimiter + 1, "443") == 0) {