mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
malloc: Ensure that the consolidated fast chunk has a sane size.
This commit is contained in:
committed by
Florian Weimer
parent
1a51e46e4a
commit
249a5895f1
@ -4431,6 +4431,12 @@ static void malloc_consolidate(mstate av)
|
||||
p = atomic_exchange_acq (fb, NULL);
|
||||
if (p != 0) {
|
||||
do {
|
||||
{
|
||||
unsigned int idx = fastbin_index (chunksize (p));
|
||||
if ((&fastbin (av, idx)) != fb)
|
||||
malloc_printerr ("malloc_consolidate(): invalid chunk size");
|
||||
}
|
||||
|
||||
check_inuse_chunk(av, p);
|
||||
nextp = p->fd;
|
||||
|
||||
|
Reference in New Issue
Block a user