mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 08:49:58 -04:00
3029. [bug] isc_netaddr_format() handle a zero sized buffer.
[RT #22521]
This commit is contained in:
parent
2ba2a6e4be
commit
4c577cbd1e
2 changed files with 7 additions and 1 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
3029. [bug] isc_netaddr_format() handle a zero sized buffer.
|
||||
[RT #22521]
|
||||
|
||||
3028. [bug] isc_sockaddr_format() handle a zero sized buffer.
|
||||
[RT #22521]
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: netaddr.c,v 1.41 2010/11/17 23:47:08 tbox Exp $ */
|
||||
/* $Id: netaddr.c,v 1.42 2011/02/21 06:30:06 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