Author: aandrejevic
Date: Wed Apr 29 00:47:06 2015
New Revision: 67475
URL:
http://svn.reactos.org/svn/reactos?rev=67475&view=rev
Log:
[NTVDM]
Don't crash when DosFreeMemory is called with BlockData == 0.
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c [iso-8859-1] Wed Apr 29
00:47:06 2015
@@ -319,6 +319,7 @@
PDOS_MCB Mcb = SEGMENT_TO_MCB(BlockData - 1);
DPRINT("DosFreeMemory: BlockData 0x%04X\n", BlockData);
+ if (BlockData == 0) return FALSE;
/* Make sure the MCB is valid */
if (Mcb->BlockType != 'M' && Mcb->BlockType != 'Z')