You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2019/02/12 00:09:38 UTC
[trafficserver] 02/02: preventing crashing when calling
TSSslContextFindByName with a nullptr or a 0 lenght string
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 45efe1a494b0257319af0c3d30098963f4139c5e
Author: Daniel Morilha (netlify) <da...@netlify.com>
AuthorDate: Wed Oct 24 14:12:21 2018 -0700
preventing crashing when calling TSSslContextFindByName with a nullptr or a 0 lenght string
(cherry picked from commit ac61c354acd75cf5ba653c6921c6415d78074134)
---
src/traffic_server/InkAPI.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/traffic_server/InkAPI.cc b/src/traffic_server/InkAPI.cc
index 95fa642..1933917 100644
--- a/src/traffic_server/InkAPI.cc
+++ b/src/traffic_server/InkAPI.cc
@@ -9163,6 +9163,10 @@ TSVConnSSLConnectionGet(TSVConn sslp)
tsapi TSSslContext
TSSslContextFindByName(const char *name)
{
+ if (nullptr == name || 0 == strlen(name)) {
+ // an empty name is an invalid input
+ return nullptr;
+ }
TSSslContext ret = nullptr;
SSLCertLookup *lookup = SSLCertificateConfig::acquire();
if (lookup != nullptr) {