]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorMark Andrews <marka@isc.org>
Thu, 22 Apr 2004 03:21:02 +0000 (03:21 +0000)
committerMark Andrews <marka@isc.org>
Thu, 22 Apr 2004 03:21:02 +0000 (03:21 +0000)
decunix/ibm: gethostbyname_r() only supported a small number of addresses.

lib/bind/irs/gethostent_r.c

index 3fec67587c91f5af6a2a1d5b9a0116309bd92582..0caf02a94a51c45e405643de63d45942b7ac79f4 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: gethostent_r.c,v 1.4.2.1 2004/03/09 09:17:30 marka Exp $";
+static const char rcsid[] = "$Id: gethostent_r.c,v 1.4.2.2 2004/04/22 03:21:02 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #include <port_before.h>
@@ -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;