]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Thu, 27 Jul 2000 00:11:38 +0000 (00:11 +0000)
committerAndreas Gustafsson <source@isc.org>
Thu, 27 Jul 2000 00:11:38 +0000 (00:11 +0000)
 353.   [bug]           double incrememnt in lwrew/gethost.c:copytobuf().
                        (RT# 187)

CHANGES
lib/lwres/gethost.c

diff --git a/CHANGES b/CHANGES
index 891d3e3f2b12a4455d5b01e1d484f381ec7c8e65..d39e39f0e7ce09bf3d4f022d36fb6116e7b9cb5a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+ 353.  [bug]           double increment in lwres/gethost.c:copytobuf().
+                       (RT# 187)
 
  352.  [bug]           Race condition in dns_client_t startup could cause
                        an assertion failure.
index 2a5397cfc1f417fcb03d6894785fe48d83e857fa..2e500f5ef3d8c96132d36cf5f6104b5ba3c7ef6d 100644 (file)
@@ -15,7 +15,7 @@
  * SOFTWARE.
  */
 
-/* $Id: gethost.c,v 1.17.2.1 2000/06/27 23:43:43 gson Exp $ */
+/* $Id: gethost.c,v 1.17.2.2 2000/07/27 00:11:38 gson Exp $ */
 
 #include <config.h>
 
@@ -197,11 +197,10 @@ copytobuf(struct hostent *he, struct hostent *hptr, char *buf, int buflen) {
         * Copy address list.
         */
         hptr->h_addr_list = ptr;
-        for (i = 0; he->h_addr_list[i]; i++ , ptr++) {
+        for (i = 0; he->h_addr_list[i]; i++, ptr++) {
                 memcpy(cp, he->h_addr_list[i], n);
                 hptr->h_addr_list[i] = cp;
                 cp += n;
-                i++;
         }
         hptr->h_addr_list[i] = NULL;
         ptr++;
@@ -218,7 +217,7 @@ copytobuf(struct hostent *he, struct hostent *hptr, char *buf, int buflen) {
         * Copy aliases.
         */
         hptr->h_aliases = ptr;
-        for (i = 0 ; he->h_aliases[i]; i++) {
+        for (i = 0; he->h_aliases[i]; i++) {
                 n = strlen(he->h_aliases[i]) + 1;
                 strcpy(cp, he->h_aliases[i]);
                 hptr->h_aliases[i] = cp;