From 386c8bad1b22a78ecb7144f2533bd6d5345b9446 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Mon, 15 Feb 2010 21:42:55 +0000 Subject: [PATCH] Return an error when encountering an invalid allocation info. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35482 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/malloc_debug/heap.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/system/libroot/posix/malloc_debug/heap.cpp b/src/system/libroot/posix/malloc_debug/heap.cpp index 26748815ab..013f553edf 100644 --- a/src/system/libroot/posix/malloc_debug/heap.cpp +++ b/src/system/libroot/posix/malloc_debug/heap.cpp @@ -1542,6 +1542,7 @@ heap_get_allocation_info(heap_allocator *heap, void *address, size_t *size, panic("leak check info has invalid size %lu for element size %lu," " probably memory has been overwritten past allocation size\n", info->size, bin->element_size); + return B_ERROR; } } else { if ((addr_t)address != pageBase) { @@ -1572,6 +1573,7 @@ heap_get_allocation_info(heap_allocator *heap, void *address, size_t *size, panic("leak check info has invalid size %lu for allocation of %lu," " probably memory has been overwritten past allocation size\n", info->size, allocationSize); + return B_ERROR; } }