From 885b69c8772695839850de0857cd28882bca4162 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Fri, 22 Oct 2021 20:01:34 +0200 Subject: [PATCH] AK: Check consistency during BumpAllocator allocation --- AK/BumpAllocator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/AK/BumpAllocator.h b/AK/BumpAllocator.h index 4c77b48386..2bf90dbf24 100644 --- a/AK/BumpAllocator.h +++ b/AK/BumpAllocator.h @@ -130,6 +130,7 @@ protected: VERIFY(m_current_chunk); auto& old_header = *(ChunkHeader*)m_current_chunk; + VERIFY(old_header.magic == chunk_magic); VERIFY(old_header.next_chunk == 0); old_header.next_chunk = (FlatPtr)new_chunk; m_current_chunk = (FlatPtr)new_chunk;