diff options
author | dougb <dougb@FreeBSD.org> | 2005-12-29 04:22:58 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2005-12-29 04:22:58 +0000 |
commit | 13e6e55147add29e8d7701891f70aefeb3d74645 (patch) | |
tree | 570b6e4f35462e81147786cc2f272d28fac7f470 /contrib/bind9/lib/dns/rdata.c | |
parent | 9123af99f7956e2383e5b9c4d39e84bea89915fe (diff) | |
download | FreeBSD-src-13e6e55147add29e8d7701891f70aefeb3d74645.zip FreeBSD-src-13e6e55147add29e8d7701891f70aefeb3d74645.tar.gz |
Vendor import of BIND 9.3.2
Diffstat (limited to 'contrib/bind9/lib/dns/rdata.c')
-rw-r--r-- | contrib/bind9/lib/dns/rdata.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/contrib/bind9/lib/dns/rdata.c b/contrib/bind9/lib/dns/rdata.c index 6d4c098..1b3f2a5 100644 --- a/contrib/bind9/lib/dns/rdata.c +++ b/contrib/bind9/lib/dns/rdata.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.147.2.11.2.16 2004/10/06 05:37:40 marka Exp $ */ +/* $Id: rdata.c,v 1.147.2.11.2.20 2005/07/22 05:27:52 marka Exp $ */ #include <config.h> #include <ctype.h> @@ -986,11 +986,15 @@ txt_totext(isc_region_t *source, isc_buffer_t *target) { if (*sp < 0x20 || *sp >= 0x7f) { if (tl < 4) return (ISC_R_NOSPACE); - snprintf(tp, 5, "\\%03u", *sp++); - tp += 4; + *tp++ = 0x5c; + *tp++ = 0x30 + ((*sp / 100) % 10); + *tp++ = 0x30 + ((*sp / 10) % 10); + *tp++ = 0x30 + (*sp % 10); + sp++; tl -= 4; continue; } + /* double quote, semi-colon, backslash */ if (*sp == 0x22 || *sp == 0x3b || *sp == 0x5c) { if (tl < 2) return (ISC_R_NOSPACE); @@ -1213,7 +1217,7 @@ name_tobuffer(dns_name_t *name, isc_buffer_t *target) { static isc_uint32_t uint32_fromregion(isc_region_t *region) { - unsigned long value; + isc_uint32_t value; REQUIRE(region->length >= 4); value = region->base[0] << 24; |