diff options
author | dougb <dougb@FreeBSD.org> | 2011-09-03 07:13:45 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2011-09-03 07:13:45 +0000 |
commit | f18a6196d77d71d90e7f726cfc30101abb2958e1 (patch) | |
tree | df1f07c78f187c54ea276c24753c42174127668e /contrib/bind9/lib/dns/rcode.c | |
parent | fbc49b949e99a3bf0c24ca3f9e542ae398b89dca (diff) | |
parent | 9c893fc637e8791d7faedec39c0993533a1fbb6e (diff) | |
download | FreeBSD-src-f18a6196d77d71d90e7f726cfc30101abb2958e1.zip FreeBSD-src-f18a6196d77d71d90e7f726cfc30101abb2958e1.tar.gz |
Upgrade to BIND version 9.8.1. Release notes at:
https://deepthought.isc.org/article/AA-00446/81/
or
/usr/src/contrib/bind9/
Approved by: re (kib)
Diffstat (limited to 'contrib/bind9/lib/dns/rcode.c')
-rw-r--r-- | contrib/bind9/lib/dns/rcode.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/bind9/lib/dns/rcode.c b/contrib/bind9/lib/dns/rcode.c index 18fedcd..81a4549 100644 --- a/contrib/bind9/lib/dns/rcode.c +++ b/contrib/bind9/lib/dns/rcode.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rcode.c,v 1.16 2010-12-23 04:07:58 marka Exp $ */ +/* $Id: rcode.c,v 1.16.14.2 2011-02-28 01:20:02 tbox Exp $ */ #include <config.h> #include <ctype.h> @@ -494,6 +494,9 @@ dns_rdataclass_format(dns_rdataclass_t rdclass, isc_result_t result; isc_buffer_t buf; + if (size == 0U) + return; + isc_buffer_init(&buf, array, size); result = dns_rdataclass_totext(rdclass, &buf); /* @@ -505,8 +508,6 @@ dns_rdataclass_format(dns_rdataclass_t rdclass, else result = ISC_R_NOSPACE; } - if (result != ISC_R_SUCCESS) { - snprintf(array, size, "<unknown>"); - array[size - 1] = '\0'; - } + if (result != ISC_R_SUCCESS) + strlcpy(array, "<unknown>", size); } |