mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:31:40 +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;
|
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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue