fix extraneous < in sip url parser

This commit is contained in:
Anthony Minessale 2014-07-30 22:13:57 +05:00
parent b1f382c67e
commit 49700ecf0f
1 changed files with 5 additions and 1 deletions

View File

@ -1495,7 +1495,9 @@ char *sofia_glue_get_url_from_contact(char *buf, uint8_t to_dup)
buf++;
}
if ((url = strchr(buf, '<')) && (e = switch_find_end_paren(url, '<', '>'))) {
url = strchr(buf, '<');
if (url && (e = switch_find_end_paren(url, '<', '>'))) {
url++;
if (to_dup) {
url = strdup(url);
@ -1504,6 +1506,8 @@ char *sofia_glue_get_url_from_contact(char *buf, uint8_t to_dup)
*e = '\0';
} else {
if (url) buf++;
if (to_dup) {
url = strdup(buf);
} else {