fix invalid read in aligned_alloc
authorRich Felker <dalias@aerifal.cx>
Fri, 7 Dec 2012 02:12:28 +0000 (21:12 -0500)
committerRich Felker <dalias@aerifal.cx>
Fri, 7 Dec 2012 02:12:28 +0000 (21:12 -0500)
commit2ad9cf52eb9fea12a19bcf893828e1361a0b6546
treece8ba924d60ba567fb8db75b8bd17ab4c89cfeb1
parent5c5e45e58bd0da2d74aea3e6631b240fedd707ef
fix invalid read in aligned_alloc

in case of mmap-obtained chunks, end points past the end of the
mapping and reading it may fault. since the value is not needed until
after the conditional, move the access to prevent invalid reads.
src/malloc/aligned_alloc.c