mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
malloc: harden removal from unsorted list
* malloc/malloc.c (_int_malloc): Added check before removing from unsorted list.
This commit is contained in:
committed by
DJ Delorie
parent
f9555d7312
commit
bdc3009b8f
@@ -3775,6 +3775,8 @@ _int_malloc (mstate av, size_t bytes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* remove from unsorted list */
|
/* remove from unsorted list */
|
||||||
|
if (__glibc_unlikely (bck->fd != victim))
|
||||||
|
malloc_printerr ("malloc(): corrupted unsorted chunks 3");
|
||||||
unsorted_chunks (av)->bk = bck;
|
unsorted_chunks (av)->bk = bck;
|
||||||
bck->fd = unsorted_chunks (av);
|
bck->fd = unsorted_chunks (av);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user