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:
Magnus Olsen 2008-05-04 13:23:19 +00:00
parent 1bfda5563c
commit 478e831a2b

View file

@ -914,18 +914,21 @@ NtUserEnumDisplaySettings(
USHORT Size = 0, ExtraSize = 0; USHORT Size = 0, ExtraSize = 0;
/* Copy the devmode */ /* Copy the devmode */
Status = MmCopyFromCaller(&Size, &lpDevMode->dmSize, sizeof (Size)); _SEH_TRY
if (!NT_SUCCESS(Status))
{ {
SetLastNtError(Status); ProbeForRead(&lpDevMode->dmSize, sizeof(DEVMODEW), 1);
return FALSE; Size = lpDevMode->dmSize;
ExtraSize = lpDevMode->dmDriverExtra;
} }
Status = MmCopyFromCaller(&ExtraSize, &lpDevMode->dmDriverExtra, sizeof (ExtraSize)); _SEH_HANDLE
if (!NT_SUCCESS(Status))
{ {
SetLastNtError(Status); DPRINT1("FIXME ? : Out of range of DEVMODEW size \n");
return FALSE; SetLastNtError(_SEH_GetExceptionCode());
_SEH_YIELD(return FALSE);
} }
_SEH_END;
pSafeDevMode = ExAllocatePool(PagedPool, Size + ExtraSize); pSafeDevMode = ExAllocatePool(PagedPool, Size + ExtraSize);
if (pSafeDevMode == NULL) if (pSafeDevMode == NULL)
{ {