Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 320498) +++ channels/chan_sip.c (working copy) @@ -13287,6 +13287,20 @@ /*! \brief parse uri in a way that allows semicolon stripping if legacy mode is enabled */ static int parse_uri_legacy_check(char *uri, const char *scheme, char **user, char **pass, char **domain, char **transport) { + /* Assume invalid to start */ + if (user) { + *user = 0; + } + if (pass) { + *pass = 0; + } + if (domain) { + *domain = 0; + } + if (transport) { + *transport = 0; + } + int ret = parse_uri(uri, scheme, user, pass, domain, transport); if (sip_cfg.legacy_useroption_parsing) { /* if legacy mode is active, strip semis from the user field */ char *p; Index: main/netsock2.c =================================================================== --- main/netsock2.c (revision 320498) +++ main/netsock2.c (working copy) @@ -232,6 +232,10 @@ char *s, *host, *port; int e, i, res_cnt; + if (!str) { + return 0; + } + s = ast_strdupa(str); if (!ast_sockaddr_split_hostport(s, &host, &port, flags)) { return 0;