]> git.ipfire.org Git - thirdparty/glibc.git/commit - ChangeLog
malloc: Fix for infinite loop in memalign/posix_memalign.
authorWill Newton <will.newton@linaro.org>
Thu, 10 Oct 2013 12:17:13 +0000 (13:17 +0100)
committerWill Newton <will.newton@linaro.org>
Wed, 30 Oct 2013 21:46:02 +0000 (14:46 -0700)
commita56ee40b176d0a3f47f2a7eb75208f2e3763c9fd
tree02a3f3bc0c86de86bc89f185a8312b9b1a03670d
parentc6e4925d4069d38843c02994ffd284e8c87c8929
malloc: Fix for infinite loop in memalign/posix_memalign.

A very large alignment argument passed to mealign/posix_memalign
causes _int_memalign to enter an infinite loop. Limit the maximum
alignment value to the maximum representable power of two to
prevent this from happening.

Changelog:

2013-10-30  Will Newton  <will.newton@linaro.org>

[BZ #16038]
* malloc/hooks.c (memalign_check): Limit alignment to the
maximum representable power of two.
* malloc/malloc.c (__libc_memalign): Likewise.
* malloc/tst-memalign.c (do_test): Add test for very
large alignment values.
* malloc/tst-posix_memalign.c (do_test): Likewise.
ChangeLog
malloc/hooks.c
malloc/malloc.c
malloc/tst-memalign.c
malloc/tst-posix_memalign.c