diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-05-07 20:15:45 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-05-07 20:15:45 +0000 |
commit | 329217f4aa4092d36ff8980a335391dac082af4d (patch) | |
tree | ccfa61275265a724e2900461d6871a6e29e5863a /asterisk.c | |
parent | d4c8e7d6d3d4a6100db906f157c658edd739ebec (diff) |
Check that hp->h_addr is not NULL before returning success (bug #1576)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2916 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rwxr-xr-x | asterisk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/asterisk.c b/asterisk.c index b4a643504..9106a5621 100755 --- a/asterisk.c +++ b/asterisk.c @@ -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; } |