mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-08 18:30:18 +00: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:
parent
e9c4fe93b3
commit
681421f3ca
@ -1,3 +1,8 @@
|
||||
2016-10-27 Florian Weimer <fweimer@redhat.com>
|
||||
|
||||
* malloc/malloc.c (sysmalloc): Initialize previous size field of
|
||||
mmaped chunks.
|
||||
|
||||
2016-10-28 Florian Weimer <fweimer@redhat.com>
|
||||
|
||||
* malloc/malloc.c (struct malloc_chunk): Rename prev_size, size
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user