diff --git a/lib/libupnpclient/UPNPDevice.cpp b/lib/libupnpclient/UPNPDevice.cpp index 2775f115e..aa79534c2 100644 --- a/lib/libupnpclient/UPNPDevice.cpp +++ b/lib/libupnpclient/UPNPDevice.cpp @@ -170,6 +170,9 @@ CUPnPDevice::CUPnPDevice(std::string url) throw std::runtime_error(std::string("description url returned ") + rcode); xmlDocPtr parser = parseXml(body.c_str(),charset.c_str()); + if(!parser) + throw std::runtime_error(std::string("XML: parser error")); + root = xmlDocGetRootElement(parser); if (!root) throw std::runtime_error(std::string("XML: no root node")); diff --git a/lib/libupnpclient/UPNPService.cpp b/lib/libupnpclient/UPNPService.cpp index 651471e4b..349b19912 100644 --- a/lib/libupnpclient/UPNPService.cpp +++ b/lib/libupnpclient/UPNPService.cpp @@ -99,6 +99,9 @@ std::list CUPnPService::SendSOAP(std::string action, std::list