aboutsummaryrefslogtreecommitdiffstats
path: root/channels/sip
diff options
context:
space:
mode:
authorbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2011-03-23 21:46:59 +0000
committerbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2011-03-23 21:46:59 +0000
commit3662505509eb4126426fd35a0f0fd570e3d8b89e (patch)
treed8d7af0999dddc8297500453a82d351a8fefbf17 /channels/sip
parent24ba441e67a8c63e3886eb60ec935d93862fc5d2 (diff)
Merged revisions 311612 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r311612 | bbryant | 2011-03-23 17:45:46 -0400 (Wed, 23 Mar 2011) | 9 lines Fix a possible crash in sip/reqresp_parser.c that is caused by a possible null value. (closes issue #18821) Reported by: cmaj Patches: patch-reqresp_parser_sip_uri_domain_cmp_c_locale-crash-1.8.3-rc2.diff.tx uploaded by cmaj (license 830) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@311613 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/sip')
-rw-r--r--channels/sip/reqresp_parser.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/sip/reqresp_parser.c b/channels/sip/reqresp_parser.c
index a40054ac0..594bcfad9 100644
--- a/channels/sip/reqresp_parser.c
+++ b/channels/sip/reqresp_parser.c
@@ -2009,7 +2009,11 @@ static int sip_uri_domain_cmp(const char *host1, const char *host2)
*/
if (!addr1_parsed) {
#ifdef HAVE_XLOCALE_H
- return strcasecmp_l(host1, host2, c_locale);
+ if(!c_locale) {
+ return strcasecmp(host1, host2);
+ } else {
+ return strcasecmp_l(host1, host2, c_locale);
+ }
#else
return strcasecmp(host1, host2);
#endif