From 4cc94c2ee3dfec42a689966fa396a807e89059d8 Mon Sep 17 00:00:00 2001 From: Fei Deng Date: Thu, 23 Jul 2020 11:52:50 -0500 Subject: [PATCH] add a null check to avoid crashing --- proxy/http/HttpSM.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index e96e44b554d..db0fc62debf 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -4811,6 +4811,9 @@ std::string_view HttpSM::get_outbound_cert() const { const char *cert_name = t_state.txn_conf->ssl_client_cert_filename; + if (cert_name == nullptr) { + cert_name = ""; + } return std::string_view(cert_name); }