mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
Merged revisions 321100 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r321100 | markm | 2011-05-26 16:09:35 -0400 (Thu, 26 May 2011) | 11 lines ast_sockaddr_resolve() in netsock2.c may deref a null pointer Added a null check in netsock2 ast_sockaddr_resolve() as well as added default initalizers in chan_sip parse_uri_legacy_check() to make sure that invalid uris will make null (and not undefined) user,pass,domain,transport variables (closes issue #19346) Reported by: kobaz Patches: netsock2.patch uploaded by kobaz (license 834) Tested by: kobaz, Marquis ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -232,6 +232,10 @@ int ast_sockaddr_resolve(struct ast_sockaddr **addrs, const char *str,
|
||||
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;
|
||||
|
Reference in New Issue
Block a user