alloc-util: don't use malloc_usable_size() to determine allocated size
This reverts commit d4b604ba. When realloc() is called, the extra memory between the originally requested size and the end of malloc_usable_size() isn't copied. (at least with the version of glibc that currently ships on Arch Linux) As a result, some elements get lost and use uninitialized memory, most commonly 0, and can lead to crashes. fixes #12384 (cherry picked from commit fcc72fd0)
Loading
Please register or sign in to comment