From: cantor Date: Thu, 26 Feb 2009 18:17:49 +0000 (+0000) Subject: Defend against empty location. X-Git-Tag: 1.4.1~267 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fxmltooling.git;a=commitdiff_plain;h=944cc75475812e91baafb1d68a3e84bcd700b18e Defend against empty location. git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/branches/REL_1@564 de75baf8-a10c-0410-a50a-987c0e22f00f --- diff --git a/xmltooling/soap/impl/SOAPClient.cpp b/xmltooling/soap/impl/SOAPClient.cpp index fb0ff52..9082d41 100644 --- a/xmltooling/soap/impl/SOAPClient.cpp +++ b/xmltooling/soap/impl/SOAPClient.cpp @@ -57,7 +57,7 @@ void SOAPClient::reset() void SOAPClient::send(const Envelope& env, const SOAPTransport::Address& addr) { // Prepare a transport object. - const char* pch = strchr(addr.m_endpoint,':'); + const char* pch = addr.m_endpoint ? strchr(addr.m_endpoint,':') : NULL; if (!pch) throw IOException("SOAP endpoint was not a URL."); string scheme(addr.m_endpoint, pch-addr.m_endpoint);