mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
NtUserEnumDisplaySettings
remove two MmCopyFromCaller, never use MmCopyFromCaller for it make debuging pain in the ass svn path=/trunk/; revision=33267
This commit is contained in:
parent
1bfda5563c
commit
478e831a2b
1 changed files with 11 additions and 8 deletions
|
@ -914,18 +914,21 @@ NtUserEnumDisplaySettings(
|
|||
USHORT Size = 0, ExtraSize = 0;
|
||||
|
||||
/* Copy the devmode */
|
||||
Status = MmCopyFromCaller(&Size, &lpDevMode->dmSize, sizeof (Size));
|
||||
if (!NT_SUCCESS(Status))
|
||||
_SEH_TRY
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return FALSE;
|
||||
ProbeForRead(&lpDevMode->dmSize, sizeof(DEVMODEW), 1);
|
||||
Size = lpDevMode->dmSize;
|
||||
ExtraSize = lpDevMode->dmDriverExtra;
|
||||
}
|
||||
Status = MmCopyFromCaller(&ExtraSize, &lpDevMode->dmDriverExtra, sizeof (ExtraSize));
|
||||
if (!NT_SUCCESS(Status))
|
||||
_SEH_HANDLE
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return FALSE;
|
||||
DPRINT1("FIXME ? : Out of range of DEVMODEW size \n");
|
||||
SetLastNtError(_SEH_GetExceptionCode());
|
||||
_SEH_YIELD(return FALSE);
|
||||
}
|
||||
_SEH_END;
|
||||
|
||||
|
||||
pSafeDevMode = ExAllocatePool(PagedPool, Size + ExtraSize);
|
||||
if (pSafeDevMode == NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue