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/nslookup Pull up revision 1.4 (requested ...
details: https://anonhg.NetBSD.org/src/rev/1aaef5922ee2
branches: netbsd-1-6
changeset: 528157:1aaef5922ee2
user: lukem <lukem%NetBSD.org@localhost>
date: Fri Jun 28 11:36:12 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/nslookup/debug.c | 42 +++++++++++++++++++++---------------------
1 files changed, 21 insertions(+), 21 deletions(-)
diffs (139 lines):
diff -r 0662c4085c83 -r 1aaef5922ee2 dist/bind/bin/nslookup/debug.c
--- a/dist/bind/bin/nslookup/debug.c Fri Jun 28 11:36:03 2002 +0000
+++ b/dist/bind/bin/nslookup/debug.c Fri Jun 28 11:36:12 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.c,v 1.3 2001/01/27 07:22:01 itojun Exp $ */
+/* $NetBSD: debug.c,v 1.3.2.1 2002/06/28 11:36:12 lukem Exp $ */
/*
* Copyright (c) 1985, 1989
@@ -55,7 +55,7 @@
#ifndef lint
static const char sccsid[] = "@(#)debug.c 5.26 (Berkeley) 3/21/91";
-static const char rcsid[] = "Id: debug.c,v 8.17 2000/11/08 06:47:31 marka Exp";
+static const char rcsid[] = "Id: debug.c,v 8.19 2001/09/25 04:50:26 marka Exp";
#endif /* not lint */
/*
@@ -116,12 +116,12 @@
const u_char *cp;
const HEADER *hp;
int n;
- u_int class, type;
+ u_int class, type = 0;
/*
* Print header fields.
*/
- hp = (HEADER *)msg;
+ hp = (const HEADER *)msg;
cp = msg + HFIXEDSZ;
if (printHeader || (res.options & RES_DEBUG2)) {
fprintf(file," HEADER:\n");
@@ -165,9 +165,9 @@
cp = Print_cdname(cp, msg, eom, file);
if (cp == NULL)
return;
- type = ns_get16((u_char*)cp);
+ type = ns_get16((const u_char*)cp);
cp += INT16SZ;
- class = ns_get16((u_char*)cp);
+ class = ns_get16((const u_char*)cp);
cp += INT16SZ;
fprintf(file,", type = %s", p_type(type));
fprintf(file,", class = %s\n", p_class(class));
@@ -220,7 +220,7 @@
fprintf(file,"\n------------\n");
}
-const u_char *
+static const u_char *
Print_cdname_sub(const u_char *cp, const u_char *msg, const u_char *eom,
FILE *file, int format)
{
@@ -326,16 +326,16 @@
case T_MX:
BOUNDS_CHECK(cp, INT16SZ);
- fprintf(file,"\tpreference = %u",ns_get16((u_char*)cp));
+ fprintf(file,"\tpreference = %u",ns_get16((const u_char*)cp));
cp += INT16SZ;
fprintf(file,", mail exchanger = ");
goto doname;
case T_NAPTR:
BOUNDS_CHECK(cp, 2 * INT16SZ);
- fprintf(file, "\torder = %u",ns_get16((u_char*)cp));
+ fprintf(file, "\torder = %u",ns_get16((const u_char*)cp));
cp += INT16SZ;
- fprintf(file,", preference = %u\n", ns_get16((u_char*)cp));
+ fprintf(file,", preference = %u\n", ns_get16((const u_char*)cp));
cp += INT16SZ;
/* Flags */
BOUNDS_CHECK(cp, 1);
@@ -367,11 +367,11 @@
case T_SRV:
BOUNDS_CHECK(cp, 3 * INT16SZ);
- fprintf(file, "\tpriority = %u",ns_get16((u_char*)cp));
+ fprintf(file, "\tpriority = %u",ns_get16((const u_char*)cp));
cp += INT16SZ;
- fprintf(file,", weight = %u", ns_get16((u_char*)cp));
+ fprintf(file,", weight = %u", ns_get16((const u_char*)cp));
cp += INT16SZ;
- fprintf(file,", port= %u\n", ns_get16((u_char*)cp));
+ fprintf(file,", port= %u\n", ns_get16((const u_char*)cp));
cp += INT16SZ;
fprintf(file,"\thost = ");
@@ -379,7 +379,7 @@
case T_PX:
BOUNDS_CHECK(cp, INT16SZ);
- fprintf(file,"\tpreference = %u",ns_get16((u_char*)cp));
+ fprintf(file,"\tpreference = %u",ns_get16((const u_char*)cp));
cp += INT16SZ;
fprintf(file,", RFC 822 = ");
cp = Print_cdname(cp, msg, eom, file);
@@ -398,14 +398,14 @@
case T_RT:
BOUNDS_CHECK(cp, INT16SZ);
- fprintf(file,"\tpreference = %u",ns_get16((u_char*)cp));
+ fprintf(file,"\tpreference = %u",ns_get16((const u_char*)cp));
cp += INT16SZ;
fprintf(file,", router = ");
goto doname;
case T_AFSDB:
BOUNDS_CHECK(cp, INT16SZ);
- fprintf(file,"\tsubtype = %d",ns_get16((u_char*)cp));
+ fprintf(file,"\tsubtype = %d",ns_get16((const u_char*)cp));
cp += INT16SZ;
fprintf(file,", DCE/AFS server = ");
goto doname;
@@ -472,18 +472,18 @@
return (NULL); /* compression error */
}
BOUNDS_CHECK(cp, 5 * INT32SZ);
- fprintf(file,"\n\tserial = %lu", ns_get32((u_char*)cp));
+ fprintf(file,"\n\tserial = %lu", ns_get32((const u_char*)cp));
cp += INT32SZ;
- ttl = ns_get32((u_char*)cp);
+ ttl = ns_get32((const u_char*)cp);
fprintf(file,"\n\trefresh = %lu (%s)", ttl, p_time(ttl));
cp += INT32SZ;
- ttl = ns_get32((u_char*)cp);
+ ttl = ns_get32((const u_char*)cp);
fprintf(file,"\n\tretry = %lu (%s)", ttl, p_time(ttl));
cp += INT32SZ;
- ttl = ns_get32((u_char*)cp);
+ ttl = ns_get32((const u_char*)cp);
fprintf(file,"\n\texpire = %lu (%s)", ttl, p_time(ttl));
cp += INT32SZ;
- ttl = ns_get32((u_char*)cp);
+ ttl = ns_get32((const u_char*)cp);
fprintf(file,
"\n\tminimum ttl = %lu (%s)\n", ttl, p_time(ttl));
cp += INT32SZ;
Home |
Main Index |
Thread Index |
Old Index