]> git.ipfire.org Git - thirdparty/glibc.git/commit - ChangeLog
Return requested size for malloc_usable_size when MALLOC_CHECK_ > 0
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Wed, 5 Sep 2012 16:19:00 +0000 (21:49 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Wed, 5 Sep 2012 16:19:30 +0000 (21:49 +0530)
commit6ef9cc37f0ea151a54e5c8a19950a6d5b6ff8a96
tree7dfbbb3bbdde79ba6bc06a209102c988c53e6e1c
parent4d038ae3163aba04218b05f3983473b25c943b8b
Return requested size for malloc_usable_size when MALLOC_CHECK_ > 0

[BZ #1349]

malloc_usable_size returns the usable size in an allocated chunk,
which may be >= the requested size. In the case of MALLOC_CHECK_ being
exported to > 0 however, only the requested size is usable, since a
magic value is written at the end of the request size to trap writes
beyond request bounds. Hence, when MALLOC_CHECK_ is exported to > 0,
malloc_usable_size() should return the request size.
ChangeLog
NEWS
malloc/Makefile
malloc/hooks.c
malloc/malloc.c
malloc/tst-malloc-usable.c [new file with mode: 0644]