]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2003. [bug] libbind: The DNS name/address lookup functions could
authorMark Andrews <marka@isc.org>
Wed, 8 Mar 2006 03:43:44 +0000 (03:43 +0000)
committerMark Andrews <marka@isc.org>
Wed, 8 Mar 2006 03:43:44 +0000 (03:43 +0000)
                        occasionally follow a random pointer due to
                        structures not being completely zeroed. [RT #15806]

CHANGES
lib/bind/irs/dns_ho.c

diff --git a/CHANGES b/CHANGES
index a9d405e18287dba4c8c87eb8a141b85e8b50f9ac..5363ddfeac08d3c13e4a8c8482767c3aeacfb467 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,8 @@
-2002   [bug]           libbind: tighten the constraints on when
+2003.  [bug]           libbind: The DNS name/address lookup functions could
+                       occasionally follow a random pointer due to
+                       structures not being completely zeroed. [RT #15806]
+
+2002.  [bug]           libbind: tighten the constraints on when
                        struct addrinfo._ai_pad exists.  [RT #15783]
 
 2000.  [bug]           memmove()/strtol() fix was incomplete. [RT #15812]
index e8da61a0c1a88e00db35b090a109668b018423a7..26633d607ff5d44cf010f3f421abd119500e1b06 100644 (file)
@@ -52,7 +52,7 @@
 /* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.7.4.6 2005/10/11 00:48:14 marka Exp $";
+static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.7.4.7 2006/03/08 03:43:44 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 /* Imports. */
@@ -260,7 +260,7 @@ ho_byname2(struct irs_ho *this, const char *name, int af)
                errno = ENOMEM;
                goto cleanup;
        }
-       memset(q, 0, sizeof(q));
+       memset(q, 0, sizeof(*q));
 
        switch (af) {
        case AF_INET:
@@ -352,8 +352,8 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af)
                errno = ENOMEM;
                goto cleanup;
        }
-       memset(q, 0, sizeof(q));
-       memset(q2, 0, sizeof(q2));
+       memset(q, 0, sizeof(*q));
+       memset(q2, 0, sizeof(*q2));
 
        if (af == AF_INET6 && len == IN6ADDRSZ &&
            (!memcmp(uaddr, mapped, sizeof mapped) ||
@@ -578,8 +578,8 @@ ho_addrinfo(struct irs_ho *this, const char *name, const struct addrinfo *pai)
                errno = ENOMEM;
                goto cleanup;
        }
-       memset(q, 0, sizeof(q2));
-       memset(q2, 0, sizeof(q2));
+       memset(q, 0, sizeof(*q2));
+       memset(q2, 0, sizeof(*q2));
 
        switch (pai->ai_family) {
        case AF_UNSPEC: