Skip to content
Commit fcc72fd0 authored by Aaron Barany's avatar Aaron Barany Committed by Zbigniew Jędrzejewski-Szmek
Browse files

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
parent b9de47b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment