mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 18:56:48 +00:00
[NTVDM]
Don't crash when DosFreeMemory is called with BlockData == 0. svn path=/trunk/; revision=67475
This commit is contained in:
parent
38af0226a1
commit
86c7c4fb83
1 changed files with 1 additions and 0 deletions
|
@ -319,6 +319,7 @@ BOOLEAN DosFreeMemory(WORD BlockData)
|
||||||
PDOS_MCB Mcb = SEGMENT_TO_MCB(BlockData - 1);
|
PDOS_MCB Mcb = SEGMENT_TO_MCB(BlockData - 1);
|
||||||
|
|
||||||
DPRINT("DosFreeMemory: BlockData 0x%04X\n", BlockData);
|
DPRINT("DosFreeMemory: BlockData 0x%04X\n", BlockData);
|
||||||
|
if (BlockData == 0) return FALSE;
|
||||||
|
|
||||||
/* Make sure the MCB is valid */
|
/* Make sure the MCB is valid */
|
||||||
if (Mcb->BlockType != 'M' && Mcb->BlockType != 'Z')
|
if (Mcb->BlockType != 'M' && Mcb->BlockType != 'Z')
|
||||||
|
|
Loading…
Reference in a new issue