diff options
author | Florian Weimer <fw@deneb.enyo.de> | 2018-12-31 22:04:36 +0100 |
---|---|---|
committer | Florian Weimer <fw@deneb.enyo.de> | 2018-12-31 22:09:37 +0100 |
commit | b50dd3bc8cbb1efe85399b03d7e6c0310c2ead84 (patch) | |
tree | 817ec49386ef014ba0a02926c08579408e9c71ce /ChangeLog | |
parent | 0b9c84906f653978fb8768c7ebd0ee14a47e662e (diff) | |
download | glibc-b50dd3bc8cbb1efe85399b03d7e6c0310c2ead84.tar.gz |
malloc: Always call memcpy in _int_realloc [BZ #24027]
This commit removes the custom memcpy implementation from _int_realloc
for small chunk sizes. The ncopies variable has the wrong type, and
an integer wraparound could cause the existing code to copy too few
elements (leaving the new memory region mostly uninitialized).
Therefore, removing this code fixes bug 24027.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,10 @@ +2018-12-31 Florian Weimer <fw@deneb.enyo.de> + + [BZ #24027] + * malloc/malloc.c (_int_realloc): Always call memcpy for the + copying operation. (ncopies had the wrong type, resulting in an + integer wraparound and too few elements being copied.) + 2018-12-31 H.J. Lu <hongjiu.lu@intel.com> [BZ #24022] |