Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/dist/bind/bin/named Pull up revision 1.3 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/e974b5767b00
branches:  netbsd-1-6
changeset: 528146:e974b5767b00
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Jun 28 11:33:47 2002 +0000

description:
Pull up revision 1.3 (requested by itojun in ticket #387):
Update to BIND 8.3.3.  Fixes buffer overrun in resolver code.

diffstat:

 dist/bind/bin/named/ns_ncache.c |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (45 lines):

diff -r f07b2d0c831e -r e974b5767b00 dist/bind/bin/named/ns_ncache.c
--- a/dist/bind/bin/named/ns_ncache.c   Fri Jun 28 11:33:38 2002 +0000
+++ b/dist/bind/bin/named/ns_ncache.c   Fri Jun 28 11:33:47 2002 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: ns_ncache.c,v 1.2 2001/01/27 07:21:59 itojun Exp $     */
+/*     $NetBSD: ns_ncache.c,v 1.2.2.1 2002/06/28 11:33:47 lukem Exp $  */
 
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "Id: ns_ncache.c,v 8.27 2000/04/21 06:54:09 vixie Exp";
+static const char rcsid[] = "Id: ns_ncache.c,v 8.29 2001/06/18 14:43:16 marka Exp";
 #endif /* not lint */
 
 /*
@@ -123,7 +123,7 @@
 
        while (ancount--) {
                u_int32_t ttl;
-               u_int atype, aclass;
+               int atype, aclass;
 
                n = dn_skipname(cp, eom);
                if (n < 0) {
@@ -259,14 +259,14 @@
                flags = DB_NOTAUTH|DB_NOHINTS;
        }
 
-       if ((n = db_update(dname, dp, dp, NULL, flags, hashtab, from)) != OK) {
+       n = db_update(dname, dp, dp, NULL, flags, hashtab, from);
+       if (n != OK)
                ns_debug(ns_log_ncache, 1,
                         "db_update failed (%d), cache_n_resp()", n);
-               db_freedata(dp);
-               return;
-       }
-       ns_debug(ns_log_ncache, 4,
-                "ncache succeeded: [%s %s %s] rcode:%d ttl:%ld",
-                   dname, p_type(type), p_class(class),
-                   dp->d_rcode, (long)(dp->d_ttl - tt.tv_sec));
+       else
+               ns_debug(ns_log_ncache, 4,
+                        "ncache succeeded: [%s %s %s] rcode:%d ttl:%ld",
+                        dname, p_type(type), p_class(class),
+                        dp->d_rcode, (long)(dp->d_ttl - tt.tv_sec));
+       db_detach(&dp);
 }



Home | Main Index | Thread Index | Old Index