You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2017/11/21 14:55:04 UTC
[trafficserver] branch master updated: Coverity: removing null
pointer dereference
This is an automated email from the ASF dual-hosted git repository.
amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new a0b5bd7 Coverity: removing null pointer dereference
a0b5bd7 is described below
commit a0b5bd760f1cc67a98eeb0396970c733bc4d26fe
Author: Syeda Persia Aziz <pe...@yahoo.com>
AuthorDate: Tue Nov 21 00:12:25 2017 -0600
Coverity: removing null pointer dereference
---
iocore/net/P_SNIActionPerformer.h | 2 +-
proxy/http/HttpSM.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/iocore/net/P_SNIActionPerformer.h b/iocore/net/P_SNIActionPerformer.h
index 803e09a..863fad6 100644
--- a/iocore/net/P_SNIActionPerformer.h
+++ b/iocore/net/P_SNIActionPerformer.h
@@ -65,7 +65,7 @@ public:
SNIAction(Continuation *cont) override
{
auto ssl_vc = reinterpret_cast<SSLNetVConnection *>(cont);
- auto accept_obj = ssl_vc->accept_object;
+ auto accept_obj = ssl_vc ? ssl_vc->accept_object : nullptr;
if (accept_obj && accept_obj->snpa && ssl_vc) {
auto nps = snpsMap.get(accept_obj->id);
ssl_vc->registerNextProtocolSet(reinterpret_cast<SSLNextProtocolSet *>(nps));
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index c83f516..165a1c1 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -1383,9 +1383,9 @@ plugins required to work with sni_routing.
NetVConnection *netvc = ua_session->get_netvc();
SSLNetVConnection *ssl_vc = dynamic_cast<SSLNetVConnection *>(netvc);
- auto *hs = TunnelMap.find(ssl_vc->serverName);
if (ssl_vc && ssl_vc->GetSNIMapping()) {
+ auto *hs = TunnelMap.find(ssl_vc->serverName);
if (hs != nullptr) {
t_state.hdr_info.client_request.url_get()->host_set(hs->hostname, hs->len);
if (hs->port > 0) {
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].