From 37a3e6af8aa16154d2ea6ca96d5740c6ed00af75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 21 Nov 2014 15:55:39 +0000 Subject: [PATCH] [NTVDM:DOS]: Don't forget to update CommandInfo.Env otherwise we would use the old environment buffer that is now invalid, hence corrupting the heap and doing other nasty things :P Debugged by V. svn path=/trunk/; revision=65442 --- reactos/subsystems/ntvdm/dos/dem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/subsystems/ntvdm/dos/dem.c b/reactos/subsystems/ntvdm/dos/dem.c index f5f032e7021..e65c2eff8cb 100644 --- a/reactos/subsystems/ntvdm/dos/dem.c +++ b/reactos/subsystems/ntvdm/dos/dem.c @@ -236,7 +236,7 @@ Command: { /* Expand the environment size */ EnvSize = CommandInfo.EnvLen; - Env = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Env, EnvSize); + CommandInfo.Env = Env = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Env, EnvSize); /* Repeat the request */ goto Command;