projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d7c058
)
Check that hp->h_addr is not NULL before returning success (bug #1576)
author
Mark Spencer
<markster@digium.com>
Fri, 7 May 2004 20:15:45 +0000
(20:15 +0000)
committer
Mark Spencer
<markster@digium.com>
Fri, 7 May 2004 20:15:45 +0000
(20:15 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2916
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
asterisk.c
patch
|
blob
|
history
diff --git
a/asterisk.c
b/asterisk.c
index
b4a6435
..
9106a56
100755
(executable)
--- 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;
}