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/94f7c6053502
branches:  netbsd-1-6
changeset: 528148:94f7c6053502
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Jun 28 11:34:16 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_parseutil.c |  11 +++++------
 dist/bind/bin/named/ns_parseutil.h |   7 +++----
 2 files changed, 8 insertions(+), 10 deletions(-)

diffs (74 lines):

diff -r ce6946cc2b9a -r 94f7c6053502 dist/bind/bin/named/ns_parseutil.c
--- a/dist/bind/bin/named/ns_parseutil.c        Fri Jun 28 11:33:56 2002 +0000
+++ b/dist/bind/bin/named/ns_parseutil.c        Fri Jun 28 11:34:16 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_parseutil.c,v 1.2 2001/01/27 07:21:59 itojun Exp $  */
+/*     $NetBSD: ns_parseutil.c,v 1.2.2.1 2002/06/28 11:34:16 lukem Exp $       */
 
 /*
  * Copyright (c) 1996-2000 by Internet Software Consortium.
@@ -68,8 +68,7 @@
 
 void
 free_symbol(symbol_table st, symbol_entry ste) {
-       if (ste->flags & SYMBOL_FREE_KEY)
-               freestr(ste->key);
+       ste->key = freestr(ste->key);
        if (ste->flags & SYMBOL_FREE_VALUE)
                (st->free_value)(ste->type, ste->value.pointer);
 }
@@ -149,7 +148,7 @@
 }
 
 void
-define_symbol(symbol_table st, char *key, int type, symbol_value value,
+define_symbol(symbol_table st, const char *key, int type, symbol_value value,
              unsigned int flags) {
        int hash;
        symbol_entry ste;
@@ -163,7 +162,7 @@
                ste = (symbol_entry)memget(sizeof *ste);
                if (ste == NULL)
                        panic("memget failed in define_symbol()", NULL);
-               ste->key = key;
+               ste->key = savestr(key, 1);
                ste->type = type;
                ste->value = value;
                ste->flags = flags;
@@ -173,7 +172,7 @@
                ns_debug(ns_log_parser, 7, "redefined symbol %s type %d",
                         key, type);
                free_symbol(st, ste);
-               ste->key = key;
+               ste->key = savestr(key, 1);
                ste->value = value;
                ste->flags = flags;
        }
diff -r ce6946cc2b9a -r 94f7c6053502 dist/bind/bin/named/ns_parseutil.h
--- a/dist/bind/bin/named/ns_parseutil.h        Fri Jun 28 11:33:56 2002 +0000
+++ b/dist/bind/bin/named/ns_parseutil.h        Fri Jun 28 11:34:16 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_parseutil.h,v 1.2 2001/01/27 07:22:00 itojun Exp $  */
+/*     $NetBSD: ns_parseutil.h,v 1.2.2.1 2002/06/28 11:34:24 lukem Exp $       */
 
 /*
  * Copyright (c) 1996-2000 by Internet Software Consortium.
@@ -24,7 +24,6 @@
  * Symbol Table
  */
 
-#define SYMBOL_FREE_KEY                0x01
 #define SYMBOL_FREE_VALUE      0x02
 
 typedef union symbol_value {
@@ -54,8 +53,8 @@
 void                   dprint_symbol_table(int, symbol_table);
 int                    lookup_symbol(symbol_table, const char *, int,
                                      symbol_value *);
-void                   define_symbol(symbol_table, char *, int, symbol_value,
-                                     unsigned int);
+void                   define_symbol(symbol_table, const char *, int,
+                                     symbol_value, unsigned int);
 void                   undefine_symbol(symbol_table, char *, int type);
 
 /*



Home | Main Index | Thread Index | Old Index