From: Mark Andrews Date: Thu, 22 Apr 2004 03:32:33 +0000 (+0000) Subject: pullup: X-Git-Tag: v9.2.3rc4^3~46 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=ec13cdb55eb5f7bcf362280bad18eb11cd0f0298;p=thirdparty%2Fbind9.git pullup: decunix/ibm: gethostbyname_r() only supported a small number of addresses. --- diff --git a/lib/bind/irs/gethostent_r.c b/lib/bind/irs/gethostent_r.c index 0eb2013b282..20abe593955 100644 --- a/lib/bind/irs/gethostent_r.c +++ b/lib/bind/irs/gethostent_r.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: gethostent_r.c,v 1.5 2004/03/09 06:30:01 marka Exp $"; +static const char rcsid[] = "$Id: gethostent_r.c,v 1.6 2004/04/22 03:32:33 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -214,8 +214,8 @@ copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) { /* copy up to first 35 addresses */ i = 0; - cp = hdptr->hostaddr; - eob = hdptr->hostaddr + sizeof(hdptr->hostaddr); + cp = hdptr->hostbuf; + eob = hdptr->hostbuf + sizeof(hdptr->hostbuf); hptr->h_addr_list = hdptr->h_addr_ptrs; while (he->h_addr_list[i] && i < (_MAXADDRS)) { if (n < (eob - cp)) { @@ -230,8 +230,6 @@ copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) { hptr->h_addr_list[i] = NULL; /* copy official name */ - cp = hdptr->hostbuf; - eob = hdptr->hostbuf + sizeof(hdptr->hostbuf); if ((n = strlen(he->h_name) + 1) < (eob - cp)) { strcpy(cp, he->h_name); hptr->h_name = cp;