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/29 02:36:33 UTC

[trafficserver] branch master updated: Fix potential crash from returning string_view from nullptr instead of default constructor.

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 fbf8369  Fix potential crash from returning string_view from nullptr instead of default constructor.
fbf8369 is described below

commit fbf83690d125610e6a02ce925727d29321d0a3c5
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Tue Nov 28 12:53:22 2017 -0600

    Fix potential crash from returning string_view from nullptr instead of default constructor.
---
 iocore/net/NetVConnection.cc | 4 ++--
 proxy/http/HttpSM.cc         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/iocore/net/NetVConnection.cc b/iocore/net/NetVConnection.cc
index de21160..198d0bb 100644
--- a/iocore/net/NetVConnection.cc
+++ b/iocore/net/NetVConnection.cc
@@ -56,7 +56,7 @@ NetVCOptions::get_proto_string() const
   default:
     break;
   }
-  return nullptr;
+  return {};
 }
 
 ts::string_view
@@ -70,5 +70,5 @@ NetVCOptions::get_family_string() const
   default:
     break;
   }
-  return nullptr;
+  return {};
 }
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 630e64b..8f9d652 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -8053,7 +8053,7 @@ HttpSM::find_proto_string(HTTPVersion version) const
   } else if (version == HTTPVersion(0, 9)) {
     return IP_PROTO_TAG_HTTP_0_9;
   }
-  return nullptr;
+  return {};
 }
 
 // YTS Team, yamsat Plugin

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].