diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-10-27 19:45:19 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2016-10-28 16:49:04 +0200 |
commit | 681421f3cac665a82d000d854ae6df1fb3b561a5 (patch) | |
tree | 64608085bde498765bed856e9e8466d8aa8d1af2 /malloc | |
parent | e9c4fe93b3855239752819303ca377dff0ed0553 (diff) | |
download | glibc-681421f3cac665a82d000d854ae6df1fb3b561a5.zip glibc-681421f3cac665a82d000d854ae6df1fb3b561a5.tar.gz glibc-681421f3cac665a82d000d854ae6df1fb3b561a5.tar.bz2 |
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.
Diffstat (limited to 'malloc')
-rw-r--r-- | malloc/malloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c index f3378b9..a10477e 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -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); } |