This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Allocation buffers for NSS result construction

On 04/22/2017 09:47 PM, Florian Weimer wrote:
> 2017-04-22  Florian Weimer  <>
> 	* malloc/Makefile (tests): Add tst-alloc_buffer.
> 	(routines): Add alloc_buffer_alloc_array, alloc_buffer_allocate,
> 	alloc_buffer_copy_bytes.
> 	* malloc/Versions (__libc_alloc_buffer_alloc_array)
> 	(__libc_alloc_buffer_allocate, __libc_alloc_buffer_copy_bytes):
> 	Export as GLIBC_PRIVATE.
> 	* malloc/alloc_buffer_alloc_array.c: New file.
> 	* malloc/alloc_buffer_allocate.c: Likewise.
> 	* malloc/alloc_buffer_copy_bytes.c: Likewise.
> 	* malloc/alloc_buffer_copy_string.c: Likewise.
> 	* malloc/tst-alloc_buffer.c: Likewise.
> 	* resolv/Versions (__ns_name_ntop_buffer)
> 	(__ns_name_unpack_buffer): Export as GLIBC_PRIVATE.
> 	* resolv/ns_name.c (__ns_name_ntop_buffer): New function.
> 	(ns_name_ntop): Implement using __ns_name_ntop_buffer.
> 	(__ns_name_unpack_buffer): New function.
> 	(ns_name_unpack): Implement using __ns_name_unpack_buffer.
> 	* resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r)
> 	(_nss_dns_getnetbyaddr_r): Adjust call to getanswer_r.
> 	(getanswer_r): Store result in an allocation buffer.  Use
> 	__ns_name_ntop_buffer instead of ns_name_ntop.  Remove superfluous
> 	call to res_dnok because ns_name_ntop output is always printable

Any further comments?  I'd like to commit this.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]