From e388b74dbef83b27b41b032165356a9079431c67 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Wed, 17 May 2017 04:44:48 -0500 Subject: [PATCH] BaseHeap::Release: Disallow freeing of 0x0 --- src/xenia/memory.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xenia/memory.cc b/src/xenia/memory.cc index 3e559e188..1e93830ab 100644 --- a/src/xenia/memory.cc +++ b/src/xenia/memory.cc @@ -934,6 +934,11 @@ bool BaseHeap::Release(uint32_t base_address, uint32_t* out_region_size) { return false; } + if (heap_base_ == 0x00000000 && base_page_number == 0) { + XELOGE("BaseHeap::Release: Attempt to free 0!"); + return false; + } + if (out_region_size) { *out_region_size = (base_page_entry.region_page_count * page_size_); }