mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Expand MALLOC_COPY and MALLOC_ZERO to memcpy and memset.
This commit is contained in:
@ -330,7 +330,7 @@ realloc_check(void* oldmem, size_t bytes, const void *caller)
|
||||
if (top_check() >= 0)
|
||||
newmem = _int_malloc(&main_arena, bytes+1);
|
||||
if (newmem) {
|
||||
MALLOC_COPY(newmem, oldmem, oldsize - 2*SIZE_SZ);
|
||||
memcpy(newmem, oldmem, oldsize - 2*SIZE_SZ);
|
||||
munmap_chunk(oldp);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user