BaseHeap::Release: Disallow freeing of 0x0

This commit is contained in:
Dr. Chat 2017-05-17 04:44:48 -05:00
parent 7a3af9b2c4
commit e388b74dbe
1 changed files with 5 additions and 0 deletions

View File

@ -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_);
}