[Asterisk-cvs] asterisk asterisk.c,1.82,1.83

markster at lists.digium.com markster at lists.digium.com
Fri May 7 16:06:37 CDT 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv17801

Modified Files:
	asterisk.c 
Log Message:
Check that hp->h_addr is not NULL before returning success (bug #1576)


Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- asterisk.c	7 May 2004 14:08:50 -0000	1.82
+++ asterisk.c	7 May 2004 20:15:45 -0000	1.83
@@ -1851,7 +1851,7 @@
 
 	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;
 }




More information about the svn-commits mailing list