From: Aleksandar Andrejevic Date: Fri, 2 May 2014 01:18:46 +0000 (+0000) Subject: [BASESRV] X-Git-Tag: backups/0.3.17@66124~1365^2~16 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=8be11a59895c9aa66529d165a664717dabbd524c;ds=sidebyside [BASESRV] Make sure that the console record exists before continuing. svn path=/branches/ntvdm/; revision=63099 --- diff --git a/subsystems/win/basesrv/vdm.c b/subsystems/win/basesrv/vdm.c index 8d3af6fe0fa..409a8010773 100644 --- a/subsystems/win/basesrv/vdm.c +++ b/subsystems/win/basesrv/vdm.c @@ -901,6 +901,13 @@ CSR_API(BaseSrvGetNextVDMCommand) &ConsoleRecord); } + /* Make sure we found the console record */ + if (!NT_SUCCESS(Status)) + { + Status = STATUS_INVALID_PARAMETER; + goto Cleanup; + } + /* Return the session ID */ GetNextVdmCommandRequest->iTask = ConsoleRecord->SessionId; GetNextVdmCommandRequest->WaitObjectForVDM = NULL;