mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
pullup:
1672. [bug] libbind: failed to print unknown types and classes above 4095. didn't correctly print unknown records with zero length.
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#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
|
#endif
|
||||||
|
|
||||||
/* Import. */
|
/* Import. */
|
||||||
@@ -145,8 +145,6 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
|
|||||||
addlen(x, &buf, &buflen);
|
addlen(x, &buf, &buflen);
|
||||||
len = SPRINTF((tmp, " %s %s", p_class(class), p_type(type)));
|
len = SPRINTF((tmp, " %s %s", p_class(class), p_type(type)));
|
||||||
T(addstr(tmp, len, &buf, &buflen));
|
T(addstr(tmp, len, &buf, &buflen));
|
||||||
if (rdlen == 0U)
|
|
||||||
return (buf - obuf);
|
|
||||||
T(spaced = addtab(x + len, 16, spaced, &buf, &buflen));
|
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;
|
int n, m;
|
||||||
char *p;
|
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));
|
T(addstr(tmp, len, &buf, &buflen));
|
||||||
while (rdata < edata) {
|
while (rdata < edata) {
|
||||||
p = tmp;
|
p = tmp;
|
||||||
|
@@ -95,7 +95,7 @@
|
|||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
static const char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
|
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 */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
#include "port_before.h"
|
#include "port_before.h"
|
||||||
@@ -549,7 +549,7 @@ p_type(int type) {
|
|||||||
result = sym_ntos(__p_type_syms, type, &success);
|
result = sym_ntos(__p_type_syms, type, &success);
|
||||||
if (success)
|
if (success)
|
||||||
return (result);
|
return (result);
|
||||||
if (type < 0 || type > 0xfff)
|
if (type < 0 || type > 0xffff)
|
||||||
return ("BADTYPE");
|
return ("BADTYPE");
|
||||||
sprintf(typebuf, "TYPE%d", type);
|
sprintf(typebuf, "TYPE%d", type);
|
||||||
return (typebuf);
|
return (typebuf);
|
||||||
@@ -585,7 +585,7 @@ p_class(int class) {
|
|||||||
result = sym_ntos(__p_class_syms, class, &success);
|
result = sym_ntos(__p_class_syms, class, &success);
|
||||||
if (success)
|
if (success)
|
||||||
return (result);
|
return (result);
|
||||||
if (class < 0 || class > 0xfff)
|
if (class < 0 || class > 0xffff)
|
||||||
return ("BADCLASS");
|
return ("BADCLASS");
|
||||||
sprintf(classbuf, "CLASS%d", class);
|
sprintf(classbuf, "CLASS%d", class);
|
||||||
return (classbuf);
|
return (classbuf);
|
||||||
|
Reference in New Issue
Block a user