Linux heap - skip invalid addresses in main arena (#3344)

This commit is contained in:
Anton Kochkov 2023-02-05 22:55:28 +08:00 committed by GitHub
parent 438b56e166
commit 62e1c42bdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1306,6 +1306,10 @@ void GH(print_malloc_states)(RzCore *core, GHT m_arena, MallocState *main_arena,
ta->next = main_arena->next;
while (GH(is_arena)(core, m_arena, ta->next) && ta->next != m_arena) {
ut64 ta_addr = ta->next;
/* If the pointer is equal to unsigned -1, we assume it is invalid */
if (ta->next == GHT_MAX) {
break;
}
if (!GH(rz_heap_update_main_arena)(core, ta->next, ta)) {
goto end;
}