Author: hbelusca
Date: Sat May 4 19:28:36 2013
New Revision: 58926
URL: http://svn.reactos.org/svn/reactos?rev=58926&view=rev
Log:
[CONSRV]
Hack: To try to uncover a heap corruption in CONSRV, use our own heap instead of the (default) CSR heap, so that we won't corrupt it and obtain strange bugs thrown by memory allocation in csrsrv.
Thanks to Aleksandar Andrejevic, aka. [TheFlash] for having seen that.
See CORE-7157 for more information.
Modified:
trunk/reactos/win32ss/user/consrv/init.c
Modified: trunk/reactos/win32ss/user/consrv/init.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/consrv/init.c…
==============================================================================
--- trunk/reactos/win32ss/user/consrv/init.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/consrv/init.c [iso-8859-1] Sat May 4 19:28:36 2013
@@ -481,7 +481,11 @@
CSR_SERVER_DLL_INIT(ConServerDllInitialization)
{
/* Initialize the memory */
- ConSrvHeap = RtlGetProcessHeap();
+ // HACK: To try to uncover a heap corruption in CONSRV, use our own heap
+ // instead of the CSR heap, so that we won't corrupt it.
+ // ConSrvHeap = RtlGetProcessHeap();
+ ConSrvHeap = RtlCreateHeap(HEAP_GROWABLE, NULL, 0, 0, NULL, NULL);
+ if (!ConSrvHeap) return STATUS_NO_MEMORY;
ConSrvInitConsoleSupport();