[Top][All Lists]

[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

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 
        if (default_cfg){
                const char 
-               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 @@
                LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
                const char *domain=linphone_proxy_config_get_domain(cfg);
-               if (domain!=NULL && 
+               const char *uri_domain=linphone_address_get_domain(uri);
+               if (domain!=NULL && uri_domain!=NULL && 
Email Confidentiality: e-BO Enterprises<> 
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<>. 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<>. 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<>.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]