[asterisk-commits] seanbright: branch 1.6.2 r302504 - /branches/1.6.2/main/utils.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 19 11:56:39 CST 2011
Author: seanbright
Date: Wed Jan 19 11:56:32 2011
New Revision: 302504
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=302504
Log:
Make sure that h_length is set when we short-circuit out of ast_gethostbyname.
(closes issue #16135)
Reported by: thedavidfactor
Patches:
utils.patch uploaded by thedavidfactor (license 903)
Modified:
branches/1.6.2/main/utils.c
Modified: branches/1.6.2/main/utils.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/utils.c?view=diff&rev=302504&r1=302503&r2=302504
==============================================================================
--- branches/1.6.2/main/utils.c (original)
+++ branches/1.6.2/main/utils.c Wed Jan 19 11:56:32 2011
@@ -208,6 +208,8 @@
hp->hp.h_addrtype = AF_INET;
hp->hp.h_addr_list = (void *) hp->buf;
hp->hp.h_addr = hp->buf + sizeof(void *);
+ /* For AF_INET, this will always be 4 */
+ hp->hp.h_length = 4;
if (inet_pton(AF_INET, host, hp->hp.h_addr) > 0)
return &hp->hp;
return NULL;
More information about the asterisk-commits
mailing list