Author: pschweitzer Date: Sun Sep 7 11:14:36 2008 New Revision: 36037
URL: http://svn.reactos.org/svn/reactos?rev=36037&view=rev Log: Patch by Cameron Gutman: Encapsulate MmProbeAndLockPages call inside a SEH block
Modified: branches/pierre-fsd/drivers/filesystems/fastfat/misc.c
Modified: branches/pierre-fsd/drivers/filesystems/fastfat/misc.c URL: http://svn.reactos.org/svn/reactos/branches/pierre-fsd/drivers/filesystems/f... ============================================================================== --- branches/pierre-fsd/drivers/filesystems/fastfat/misc.c [iso-8859-1] (original) +++ branches/pierre-fsd/drivers/filesystems/fastfat/misc.c [iso-8859-1] Sun Sep 7 11:14:36 2008 @@ -258,6 +258,8 @@
NTSTATUS VfatLockUserBuffer(IN PIRP Irp, IN ULONG Length, IN LOCK_OPERATION Operation) { + NTSTATUS Status = STATUS_SUCCESS; + ASSERT(Irp);
if (Irp->MdlAddress) @@ -272,9 +274,13 @@ return STATUS_INSUFFICIENT_RESOURCES; }
- MmProbeAndLockPages(Irp->MdlAddress, Irp->RequestorMode, Operation); - - return STATUS_SUCCESS; -} - - + _SEH_TRY { + MmProbeAndLockPages(Irp->MdlAddress, Irp->RequestorMode, Operation); + } _SEH_HANDLE { + Status = _SEH_GetExceptionCode(); + } _SEH_END; + + return Status; +} + +