[ros-diffs] [tkreuzer] 55599: [FREELDR] Add a hack to zero out heap allocations in the hope it fixes strange behavour

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Tue Feb 14 22:08:35 UTC 2012


Author: tkreuzer
Date: Tue Feb 14 22:08:34 2012
New Revision: 55599

URL: http://svn.reactos.org/svn/reactos?rev=55599&view=rev
Log:
[FREELDR]
Add a hack to zero out heap allocations in the hope it fixes strange behavour

Modified:
    trunk/reactos/boot/freeldr/freeldr/mm/heap_new.c

Modified: trunk/reactos/boot/freeldr/freeldr/mm/heap_new.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/heap_new.c?rev=55599&r1=55598&r2=55599&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/mm/heap_new.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/mm/heap_new.c [iso-8859-1] Tue Feb 14 22:08:34 2012
@@ -375,6 +375,9 @@
         TRACE("HeapAllocate(%p, %ld, %.4s) -> return %p\n",
               HeapHandle, ByteSize, &Tag, Block->Data);
 
+        /* HACK: zero out the allocation */
+        RtlZeroMemory(Block->Data, Block->Size * sizeof(HEAP_BLOCK));
+
 #ifdef FREELDR_HEAP_VERIFIER
         /* Write size and redzones */
         *REDZONE_SIZE(Block) = ByteSize - REDZONE_ALLOCATION;




More information about the Ros-diffs mailing list