mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 21:47:59 +00:00
isc_sockaddr_format() check for sies equal 0
This commit is contained in:
parent
d775887f01
commit
baab444222
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: sockaddr.c,v 1.70 2007/06/19 23:47:17 tbox Exp $ */
|
||||
/* $Id: sockaddr.c,v 1.71 2010/11/16 00:42:35 marka 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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user