[haiku-commits] r35482 - haiku/trunk/src/system/libroot/posix/malloc_debug

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 15 Feb 2010 22:42:55 +0100 (CET)

Author: mmlr
Date: 2010-02-15 22:42:55 +0100 (Mon, 15 Feb 2010)
New Revision: 35482
Changeset: http://dev.haiku-os.org/changeset/35482/haiku

Modified:
   haiku/trunk/src/system/libroot/posix/malloc_debug/heap.cpp
Log:
Return an error when encountering an invalid allocation info.


Modified: haiku/trunk/src/system/libroot/posix/malloc_debug/heap.cpp
===================================================================
--- haiku/trunk/src/system/libroot/posix/malloc_debug/heap.cpp  2010-02-15 
21:35:07 UTC (rev 35481)
+++ haiku/trunk/src/system/libroot/posix/malloc_debug/heap.cpp  2010-02-15 
21:42:55 UTC (rev 35482)
@@ -1542,6 +1542,7 @@
                        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 @@
                        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;
                }
        }
 


Other related posts:

  • » [haiku-commits] r35482 - haiku/trunk/src/system/libroot/posix/malloc_debug - mmlr