From: Scott Cantor Date: Thu, 26 Feb 2009 18:17:49 +0000 (+0000) Subject: Defend against empty location. X-Git-Tag: 1.2.0~31 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=commitdiff_plain;h=d1ad257a4c898af852e5dad577bb94c52e14429a Defend against empty location. --- 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);