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.4 (requested by ...
details: https://anonhg.NetBSD.org/src/rev/ab19c91d64c5
branches: netbsd-1-6
changeset: 528143:ab19c91d64c5
user: lukem <lukem%NetBSD.org@localhost>
date: Fri Jun 28 11:33:06 2002 +0000
description:
Pull up revision 1.4 (requested by itojun in ticket #387):
Update to BIND 8.3.3. Fixes buffer overrun in resolver code.
diffstat:
dist/bind/bin/named/ns_lexer.c | 26 +++++++++++++++++++-------
dist/bind/bin/named/ns_lexer.h | 8 +++-----
2 files changed, 22 insertions(+), 12 deletions(-)
diffs (134 lines):
diff -r f945fbf208f0 -r ab19c91d64c5 dist/bind/bin/named/ns_lexer.c
--- a/dist/bind/bin/named/ns_lexer.c Fri Jun 28 11:32:57 2002 +0000
+++ b/dist/bind/bin/named/ns_lexer.c Fri Jun 28 11:33:06 2002 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: ns_lexer.c,v 1.3 2001/01/27 07:21:59 itojun Exp $ */
+/* $NetBSD: ns_lexer.c,v 1.3.2.1 2002/06/28 11:33:06 lukem Exp $ */
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "Id: ns_lexer.c,v 8.22 2000/11/29 06:55:58 marka Exp";
+static const char rcsid[] = "Id: ns_lexer.c,v 8.31 2002/05/24 03:05:03 marka Exp";
#endif /* not lint */
/*
@@ -59,7 +59,7 @@
#define LEXER_MAX_PUSHBACK 2
typedef struct lexer_file_context {
- const char * name;
+ char * name;
FILE * stream;
int line_number;
LexerState state;
@@ -149,6 +149,10 @@
static void
parser_complain(int is_warning, int print_last_token, const char *format,
+ va_list args) ISC_FORMAT_PRINTF(3, 0);
+
+static void
+parser_complain(int is_warning, int print_last_token, const char *format,
va_list args)
{
LexerFileContext lf;
@@ -214,7 +218,7 @@
*/
struct keyword {
- char *name;
+ const char *name;
int token;
};
@@ -254,6 +258,8 @@
{"directory", T_DIRECTORY},
{"dump-file", T_DUMP_FILE},
{"dynamic", T_DYNAMIC},
+ {"edns", T_EDNS},
+ {"explicit", T_EXPLICIT},
{"fail", T_FAIL},
{"fake-iquery", T_FAKE_IQUERY},
{"false", T_FALSE},
@@ -272,6 +278,7 @@
#endif /* HITCOUNTS */
{"host-statistics", T_HOSTSTATS},
{"host-statistics-max", T_HOSTSTATSMAX},
+ {"hostname", T_HOSTNAME},
{"if-no-answer", T_IF_NO_ANSWER},
{"if-no-domain", T_IF_NO_DOMAIN},
{"ignore", T_IGNORE},
@@ -310,6 +317,7 @@
{"perm", T_PERM},
{"pid-file", T_PIDFILE},
{"port", T_PORT},
+ {"preferred-glue", T_PREFERRED_GLUE},
{"print-category", T_PRINT_CATEGORY},
{"print-severity", T_PRINT_SEVERITY},
{"print-time", T_PRINT_TIME},
@@ -331,6 +339,9 @@
{"statistics-interval", T_STATS_INTERVAL},
{"stub", T_STUB},
{"support-ixfr", T_SUPPORT_IXFR},
+#ifdef BIND_NOTIFY
+ {"suppress-initial-notify", T_NOTIFY_INITIAL},
+#endif
{"syslog", T_SYSLOG},
{"topology", T_TOPOLOGY},
{"transfer-format", T_TRANSFER_FORMAT},
@@ -398,7 +409,7 @@
panic("memget failed in lexer_begin_file", NULL);
INSIST(stream != NULL);
lf->stream = stream;
- lf->name = filename; /* note copy by reference */
+ lf->name = savestr(filename, 1);
lf->line_number = 1;
lf->state = scan;
lf->flags = 0;
@@ -417,6 +428,7 @@
lf = current_file;
current_file = lf->next;
fclose(lf->stream);
+ freestr(lf->name);
memput(lf, sizeof *lf);
}
@@ -481,7 +493,7 @@
}
}
-int
+static int
get_next_char(int comment_ok) {
int c, nc;
@@ -525,7 +537,7 @@
return (c);
}
-void
+static void
put_back_char(int c) {
if (c == EOF)
current_file->flags |= LEX_EOF;
diff -r f945fbf208f0 -r ab19c91d64c5 dist/bind/bin/named/ns_lexer.h
--- a/dist/bind/bin/named/ns_lexer.h Fri Jun 28 11:32:57 2002 +0000
+++ b/dist/bind/bin/named/ns_lexer.h Fri Jun 28 11:33:06 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ns_lexer.h,v 1.3 2001/01/27 07:21:59 itojun Exp $ */
+/* $NetBSD: ns_lexer.h,v 1.3.2.1 2002/06/28 11:33:15 lukem Exp $ */
/*
* Copyright (c) 1996-2000 by Internet Software Consortium.
@@ -32,10 +32,8 @@
#define SYM_LOGGING 0x04
#define SYM_SYSLOG 0x08
-int parser_warning(int, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
-int parser_error(int, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+int parser_warning(int, const char *, ...) ISC_FORMAT_PRINTF(2, 3);
+int parser_error(int, const char *, ...) ISC_FORMAT_PRINTF(2, 3);
void yyerror(const char *);
void lexer_begin_file(const char *, FILE *);
void lexer_end_file(void);
Home |
Main Index |
Thread Index |
Old Index