]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorMark Andrews <marka@isc.org>
Wed, 28 Jul 2004 20:16:50 +0000 (20:16 +0000)
committerMark Andrews <marka@isc.org>
Wed, 28 Jul 2004 20:16:50 +0000 (20:16 +0000)
1672.   [bug]           libbind: failed to print unknown types and classes
                        above 4095. didn't correctly print unknown records
                        with zero length.

lib/bind/nameser/ns_print.c
lib/bind/resolv/res_debug.c

index aea847daba3b0f783c9cde7785828ceb207c79d0..51592862b8df9c575d4e558fbe545e181b22d81e 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: ns_print.c,v 1.6 2004/03/18 02:58:01 marka Exp $";
+static const char rcsid[] = "$Id: ns_print.c,v 1.7 2004/07/28 20:16:49 marka Exp $";
 #endif
 
 /* Import. */
@@ -145,8 +145,6 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
        addlen(x, &buf, &buflen);
        len = SPRINTF((tmp, " %s %s", p_class(class), p_type(type)));
        T(addstr(tmp, len, &buf, &buflen));
-       if (rdlen == 0U)
-               return (buf - obuf);
        T(spaced = addtab(x + len, 16, spaced, &buf, &buflen));
 
        /*
@@ -707,7 +705,8 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
        int n, m;
        char *p;
 
-       len = SPRINTF((tmp, "\\# %u (\t; %s", edata - rdata, comment));
+       len = SPRINTF((tmp, "\\# %u%s\t; %s", edata - rdata,
+                      rdlen != 0 ? " (" : "", comment));
        T(addstr(tmp, len, &buf, &buflen));
        while (rdata < edata) {
                p = tmp;
index 1a6108b3a155638243da7d3febba6becb4be4b7b..e4b8723ad615b7695c6df4f431378be899170709 100644 (file)
@@ -95,7 +95,7 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
 static const char sccsid[] = "@(#)res_debug.c  8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_debug.c,v 1.12 2004/04/13 07:19:18 marka Exp $";
+static const char rcsid[] = "$Id: res_debug.c,v 1.13 2004/07/28 20:16:50 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #include "port_before.h"
@@ -549,7 +549,7 @@ p_type(int type) {
        result = sym_ntos(__p_type_syms, type, &success);
        if (success)
                return (result);
-       if (type < 0 || type > 0xfff)
+       if (type < 0 || type > 0xffff)
                return ("BADTYPE");
        sprintf(typebuf, "TYPE%d", type);
        return (typebuf);
@@ -585,7 +585,7 @@ p_class(int class) {
        result = sym_ntos(__p_class_syms, class, &success);
        if (success)
                return (result);
-       if (class < 0 || class > 0xfff)
+       if (class < 0 || class > 0xffff)
                return ("BADCLASS");
        sprintf(classbuf, "CLASS%d", class);
        return (classbuf);