Commit 1a87b91e authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Fixed crash if trying to create chatroom from a badly formatted address

parent ac12e688
......@@ -3734,6 +3734,10 @@ LinphoneProxyConfig * linphone_core_lookup_known_proxy(LinphoneCore *lc, const L
LinphoneProxyConfig *found_noreg_cfg=NULL;
LinphoneProxyConfig *default_cfg=lc->default_proxy;
if (!uri) {
ms_error("Cannot look for proxy for NULL uri, returning default");
return default_cfg;
}
if (linphone_address_get_domain(uri) == NULL) {
ms_message("Cannot look for proxy for uri [%p] that has no domain set, returning default", uri);
return default_cfg;
......
......@@ -62,11 +62,14 @@ static IdentityAddress getDefaultLocalAddress(const shared_ptr<Core> &core, cons
if (peerAddress) {
LinphoneAddress *cPeerAddress = linphone_address_new(peerAddress->asString().c_str());
proxy = linphone_core_lookup_known_proxy(cCore, cPeerAddress);
linphone_address_unref(cPeerAddress);
} else {
if (cPeerAddress) {
proxy = linphone_core_lookup_known_proxy(cCore, cPeerAddress);
linphone_address_unref(cPeerAddress);
}
}
if (!proxy)
proxy = linphone_core_get_default_proxy_config(cCore);
}
IdentityAddress localAddress;
if (proxy) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment