[PATCH] Allocation buffers for NSS result construction
Florian Weimer
fweimer@redhat.com
Fri Jun 16 12:20:00 GMT 2017
On 04/22/2017 09:47 PM, Florian Weimer wrote:
> 2017-04-22 Florian Weimer <fweimer@redhat.com>
>
> * 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
> ASCII.
Any further comments? I'd like to commit this.
Thanks,
Florian
More information about the Libc-alpha
mailing list