Skip to content
Snippets Groups Projects
Commit 1057e70d authored by Mark Spencer's avatar Mark Spencer
Browse files

Check that hp->h_addr is not NULL before returning success (bug #1576)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 1d7c058f
Branches
Tags
No related merge requests found
......@@ -1851,7 +1851,7 @@ struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp)
res = gethostbyname_r(host, &hp->hp, hp->buf, sizeof(hp->buf), &result, &herrno);
if (res)
if (res || !hp->hp.h_addr)
return NULL;
return &hp->hp;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment