Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 415710) +++ channels/chan_sip.c (working copy) @@ -18392,14 +18392,15 @@ int sipmethod, const char *uri, enum xmittype reliable, struct ast_sockaddr *addr, struct sip_peer **authpeer) { - char from[256], *of, *name, *unused_password, *domain; + char *from, *of, *name, *unused_password, *domain; enum check_auth_result res = AUTH_DONT_KNOW; char calleridname[256]; char *uri2 = ast_strdupa(uri); terminate_uri(uri2); /* trim extra stuff */ - ast_copy_string(from, sip_get_header(req, "From"), sizeof(from)); + from = ast_strdupa(sip_get_header(req, "From")); + from = ast_strdupa(sip_get_header(req, "From")); /* XXX here tries to map the username for invite things */ /* strip the display-name portion off the beginning of the FROM header. */ @@ -18480,8 +18481,7 @@ } if (!ast_strlen_zero(hdr) && (hdr = strstr(hdr, "username=\""))) { - ast_copy_string(from, hdr + strlen("username=\""), sizeof(from)); - name = from; + name = ast_strdupa(hdr + strlen("username=\"")); name = strsep(&name, "\""); } }