1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Implement allocation buffers for internal use

This commit adds fixed-size allocation buffers.  The primary use
case is in NSS modules, where dynamically sized data is stored
in a fixed-size buffer provided by the caller.

Other uses include a replacement of mempcpy cascades (which is
safer due to the size checking inherent to allocation buffers).
This commit is contained in:
Florian Weimer
2017-06-21 22:43:57 +02:00
parent 11ffcacb64
commit 4dd8e7c0ce
10 changed files with 1240 additions and 1 deletions

View File

@ -76,7 +76,6 @@ libc {
__libc_scratch_buffer_grow_preserve;
__libc_scratch_buffer_set_array_size;
# Internal name for reallocarray
__libc_reallocarray;
@ -86,5 +85,12 @@ libc {
__libc_dynarray_finalize;
__libc_dynarray_resize;
__libc_dynarray_resize_clear;
# struct alloc_buffer support
__libc_alloc_buffer_alloc_array;
__libc_alloc_buffer_allocate;
__libc_alloc_buffer_copy_bytes;
__libc_alloc_buffer_copy_string;
__libc_alloc_buffer_create_failure;
}
}