mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
sysmalloc: Initialize previous size field of mmaped chunks
With different encodings of the header, the previous zero initialization may be insufficient and produce an invalid encoding.
This commit is contained in:
@ -2306,6 +2306,7 @@ sysmalloc (INTERNAL_SIZE_T nb, mstate av)
|
||||
else
|
||||
{
|
||||
p = (mchunkptr) mm;
|
||||
set_prev_size (p, 0);
|
||||
set_head (p, size | IS_MMAPPED);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user