summaryrefslogtreecommitdiff
path: root/lib/isc/sockaddr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/isc/sockaddr.c')
-rw-r--r--lib/isc/sockaddr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/isc/sockaddr.c b/lib/isc/sockaddr.c
index 9661ee48..fe270664 100644
--- a/lib/isc/sockaddr.c
+++ b/lib/isc/sockaddr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007, 2010 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2010, 2011 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-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: sockaddr.c,v 1.73 2010-11-17 23:47:09 tbox Exp $ */
+/* $Id: sockaddr.c,v 1.73.38.2 2011-02-28 01:20:03 tbox Exp $ */
/*! \file */
@@ -182,6 +182,9 @@ isc_sockaddr_format(const isc_sockaddr_t *sa, char *array, unsigned int size) {
isc_result_t result;
isc_buffer_t buf;
+ if (size == 0U)
+ return;
+
isc_buffer_init(&buf, array, size);
result = isc_sockaddr_totext(sa, &buf);
if (result != ISC_R_SUCCESS) {