mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
isc_netaddr_format() check for sies equal 0
This commit is contained in:
parent
baab444222
commit
c2f5ddeeec
1 changed files with 4 additions and 1 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: netaddr.c,v 1.38 2007/06/18 23:47:44 tbox Exp $ */
|
||||
/* $Id: netaddr.c,v 1.39 2010/11/16 00:43:02 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -188,6 +188,9 @@ isc_netaddr_format(const isc_netaddr_t *na, char *array, unsigned int size) {
|
|||
isc_buffer_init(&buf, array, size);
|
||||
result = isc_netaddr_totext(na, &buf);
|
||||
|
||||
if (size == 0)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Null terminate.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue