Author: hbelusca
Date: Fri Nov 21 15:55:39 2014
New Revision: 65442
URL:
http://svn.reactos.org/svn/reactos?rev=65442&view=rev
Log:
[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.
Modified:
trunk/reactos/subsystems/ntvdm/dos/dem.c
Modified: trunk/reactos/subsystems/ntvdm/dos/dem.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/dos/dem.c…
==============================================================================
--- trunk/reactos/subsystems/ntvdm/dos/dem.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/ntvdm/dos/dem.c [iso-8859-1] Fri Nov 21 15:55:39 2014
@@ -236,7 +236,7 @@
{
/* 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;