[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Linphone-developers] BUG (+patch): linphone segfaults on some invalid a
From: |
David Lesaffre |
Subject: |
[Linphone-developers] BUG (+patch): linphone segfaults on some invalid addresses |
Date: |
Thu, 6 Jun 2013 08:36:37 +0000 |
BUG:
Using an invalid address such as <dummy:address@hidden> crashes the library
with a "segmentation fault".
There might be a better place to check for a correct address, but this solved
the problem for me.
Patch against git commit 0fd44a7a545221fcc7cedee97b2eed9ae916b43e:
--- coreapi/linphonecore.c 2013-06-06 09:13:34.498066251 +0200
+++ coreapi/linphonecore.c_new 2013-06-06 09:49:05.226003295 +0200
@@ -2314,7 +2314,8 @@
/*always prefer the default proxy if it is matching the destination
uri*/
if (default_cfg){
const char
*domain=linphone_proxy_config_get_domain(default_cfg);
- if (strcmp(domain,linphone_address_get_domain(uri))==0)
+ const char *uri_domain=linphone_address_get_domain(uri);
+ if (uri_domain != NULL && strcmp(domain,uri_domain)==0)
return default_cfg;
}
@@ -2322,7 +2323,8 @@
for
(elem=linphone_core_get_proxy_config_list(lc);elem!=NULL;elem=elem->next){
LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
const char *domain=linphone_proxy_config_get_domain(cfg);
- if (domain!=NULL &&
strcmp(domain,linphone_address_get_domain(uri))==0){
+ const char *uri_domain=linphone_address_get_domain(uri);
+ if (domain!=NULL && uri_domain!=NULL &&
strcmp(domain,uri_domain)==0){
found_cfg=cfg;
break;
}
Email Confidentiality: e-BO Enterprises<http://www.ebo-enterprises.com/>
Company Registration Number BE 0470174242. This email message and any
attachments are for the sole use of the intended recipient(s) and may contain
information that is proprietary to e-BO
Enterprises<http://www.ebo-enterprises.com/>. If you have received this message
in error, please notify the sender by reply, and delete all copies of this
message and any attachments. If you are the intended recipient you may use the
information contained in this message and any files attached to this message
only as authorized by e-BO Enterprises<http://www.ebo-enterprises.com/>. Any
unauthorized use, dissemination or disclosure of this message or its
attachments is strictly prohibited. The contents of this e-mail are not to be
considered binding upon e-BO Enterprises<http://www.ebo-enterprises.com/>.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Linphone-developers] BUG (+patch): linphone segfaults on some invalid addresses,
David Lesaffre <=