mirror of
https://github.com/reactos/reactos.git
synced 2024-09-08 19:59:49 +00:00
[NTVDM]
Also check for BlockData == 0 in RosResizeMemory. This, however, wasn't a crash since we were lucky enough to cast the segment to a WORD before the access. svn path=/trunk/; revision=67476
This commit is contained in:
parent
86c7c4fb83
commit
eba20f3ad8
|
@ -210,7 +210,9 @@ BOOLEAN DosResizeMemory(WORD BlockData, WORD NewSize, WORD *MaxAvailable)
|
||||||
NewSize);
|
NewSize);
|
||||||
|
|
||||||
/* Make sure this is a valid, allocated block */
|
/* Make sure this is a valid, allocated block */
|
||||||
if ((Mcb->BlockType != 'M' && Mcb->BlockType != 'Z') || Mcb->OwnerPsp == 0)
|
if (BlockData == 0
|
||||||
|
|| (Mcb->BlockType != 'M' && Mcb->BlockType != 'Z')
|
||||||
|
|| Mcb->OwnerPsp == 0)
|
||||||
{
|
{
|
||||||
Success = FALSE;
|
Success = FALSE;
|
||||||
DosLastError = ERROR_INVALID_HANDLE;
|
DosLastError = ERROR_INVALID_HANDLE;
|
||||||
|
|
Loading…
Reference in a new issue