3029. [bug] isc_netaddr_format() handle a zero sized buffer.
[RT #22521]
This commit is contained in:
@@ -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.38.332.1 2011/02/21 06:35: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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user