Menu

#118 sofia sip crash on android

open
nobody
None
5
2012-03-22
2012-03-22
Anonymous
No

When the TO sip header or FROM sip header starts with a '<', the code crash on android. After tracking the problem it seems that there is an error in sip_basic.c. In the method "sip_name_addr" you can see the variable is assigned to an empty string when the sip header starts with a '<'.

if (s[n] == '<') {
/* OK, we got a display name */
display = s; s += n + 1;
/* NUL terminate display name */
while (n > 0 && IS_LWS(display[n - 1]))
n--;
if (n > 0)
display[n] = '\0';
else
display="";

Since the address of display is assigned to *return_display, this gives problems on Android.
If we change display="" with display=NULL the code doesn't crashed.

Discussion


Log in to post a comment.