You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/06/29 16:18:24 UTC
[trafficserver] 02/02: Fix StringView constructor to not fail on a
nulll pointer.
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 0af78065b5ca1287fa98971d73ff27782292e10f
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Wed Jun 28 17:51:14 2017 -0500
Fix StringView constructor to not fail on a nulll pointer.
(cherry picked from commit f43abe5069457596bdc02bf5f2454d3d4125ed01)
---
lib/ts/MemView.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ts/MemView.cc b/lib/ts/MemView.cc
index 3ae7749..9699bc1 100644
--- a/lib/ts/MemView.cc
+++ b/lib/ts/MemView.cc
@@ -30,7 +30,7 @@
namespace ts
{
-StringView::StringView(const char *s) : _ptr(s), _size(strlen(s))
+StringView::StringView(const char *s) : _ptr(s), _size(s ? strlen(s) : 0)
{
}
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.