From 554df0ecbf49e911bfeb3e42c67f93716c3d619e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 4 May 2013 19:28:36 +0000 Subject: [PATCH] [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. svn path=/trunk/; revision=58926 --- reactos/win32ss/user/consrv/init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/win32ss/user/consrv/init.c b/reactos/win32ss/user/consrv/init.c index 6aa0067fe64..640f76f67a0 100644 --- a/reactos/win32ss/user/consrv/init.c +++ b/reactos/win32ss/user/consrv/init.c @@ -481,7 +481,11 @@ ConSrvDisconnect(PCSR_PROCESS Process) 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();