trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [2/3] git commit: TS-1476: avoid passing NULL to strstr()
Date Thu, 06 Jun 2013 16:24:01 GMT
TS-1476: avoid passing NULL to strstr()


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/76ea8c50
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/76ea8c50
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/76ea8c50

Branch: refs/heads/master
Commit: 76ea8c5004b6ef23934d88598839cfa898d28862
Parents: 701db59
Author: James Peach <jpeach@apache.org>
Authored: Wed Jun 5 20:45:29 2013 -0700
Committer: James Peach <jpeach@apache.org>
Committed: Thu Jun 6 09:23:38 2013 -0700

----------------------------------------------------------------------
 mgmt/api/CfgContextImpl.cc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/76ea8c50/mgmt/api/CfgContextImpl.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/CfgContextImpl.cc b/mgmt/api/CfgContextImpl.cc
index f4bc43c..cb793ec 100644
--- a/mgmt/api/CfgContextImpl.cc
+++ b/mgmt/api/CfgContextImpl.cc
@@ -2404,8 +2404,9 @@ bool UpdateObj::isValid()
   }
   // recursion depth can only be specified for http
   if (m_ele->recursion_depth > 0) {
-    if (!strstr(m_ele->url, "http"))
+    if (!m_ele->url || !strstr(m_ele->url, "http")) {
       m_valid = false;
+    }
   }
 
   if (!m_valid)


Mime
View raw message