[Asterisk-cvs] asterisk utils.c,1.74,1.75
markster
markster
Fri Oct 21 10:15:29 CDT 2005
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv29139
Modified Files:
utils.c
Log Message:
Fix segfault in CVS head (sorry about that)
Index: utils.c
===================================================================
RCS file: /usr/cvsroot/asterisk/utils.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- utils.c 21 Oct 2005 04:09:23 -0000 1.74
+++ utils.c 21 Oct 2005 14:09:03 -0000 1.75
@@ -191,7 +191,9 @@
/* Forge a reply for IP's to avoid octal IP's being interpreted as octal */
if (dots != 3)
return NULL;
- hp->hp.h_addr = hp->buf;
+ memset(hp, 0, sizeof(struct ast_hostent));
+ hp->hp.h_addr_list = hp->buf;
+ hp->hp.h_addr = hp->buf + sizeof(void *);
if (inet_pton(AF_INET, host, hp->hp.h_addr) > 0)
return &hp->hp;
return NULL;
More information about the svn-commits
mailing list