Author: pschweitzer Date: Wed Oct 29 04:44:28 2008 New Revision: 37047
URL: http://svn.reactos.org/svn/reactos?rev=37047&view=rev Log: Changes to match with previous commit (r37046): - Added PSEH to CDFS - Encapsulated FsRtlIsNameInExpression calls inside a PSEH block in fastfat and CDFS drivers
Modified: branches/pierre-fsd/drivers/filesystems/cdfs/cdfs.h branches/pierre-fsd/drivers/filesystems/cdfs/cdfs.rbuild branches/pierre-fsd/drivers/filesystems/cdfs/dirctl.c branches/pierre-fsd/drivers/filesystems/cdfs/fcb.c branches/pierre-fsd/drivers/filesystems/fastfat/create.c
Modified: branches/pierre-fsd/drivers/filesystems/cdfs/cdfs.h URL: http://svn.reactos.org/svn/reactos/branches/pierre-fsd/drivers/filesystems/c... ============================================================================== --- branches/pierre-fsd/drivers/filesystems/cdfs/cdfs.h [iso-8859-1] (original) +++ branches/pierre-fsd/drivers/filesystems/cdfs/cdfs.h [iso-8859-1] Wed Oct 29 04:44:28 2008 @@ -5,6 +5,7 @@ #include <ntddk.h> #include <ntddcdrm.h> #include <ccros.h> +#include <pseh/pseh.h>
#define CDFS_BASIC_SECTOR 2048 #define CDFS_PRIMARY_DESCRIPTOR_LOCATION 16
Modified: branches/pierre-fsd/drivers/filesystems/cdfs/cdfs.rbuild URL: http://svn.reactos.org/svn/reactos/branches/pierre-fsd/drivers/filesystems/c... ============================================================================== --- branches/pierre-fsd/drivers/filesystems/cdfs/cdfs.rbuild [iso-8859-1] (original) +++ branches/pierre-fsd/drivers/filesystems/cdfs/cdfs.rbuild [iso-8859-1] Wed Oct 29 04:44:28 2008 @@ -5,6 +5,7 @@ <include base="cdfs">.</include> <library>ntoskrnl</library> <library>hal</library> + <library>pseh</library> <file>cdfs.c</file> <file>cleanup.c</file> <file>close.c</file>
Modified: branches/pierre-fsd/drivers/filesystems/cdfs/dirctl.c URL: http://svn.reactos.org/svn/reactos/branches/pierre-fsd/drivers/filesystems/c... ============================================================================== --- branches/pierre-fsd/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] (original) +++ branches/pierre-fsd/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] Wed Oct 29 04:44:28 2008 @@ -172,6 +172,7 @@ ULONG DirIndex; ULONG Offset = 0; BOOLEAN IsRoot; + BOOLEAN Found = FALSE; PVOID Context = NULL; ULONG DirSize; PDIR_RECORD Record; @@ -306,8 +307,22 @@
DPRINT("ShortName '%wZ'\n", &ShortName);
- if (FsRtlIsNameInExpression(FileToFind, &LongName, TRUE, NULL) || - FsRtlIsNameInExpression(FileToFind, &ShortName, TRUE, NULL)) + _SEH_TRY + { + Found = FsRtlIsNameInExpression(FileToFind, &LongName, TRUE, NULL) || + FsRtlIsNameInExpression(FileToFind, &ShortName, TRUE, NULL); + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + if (!NT_SUCCESS(Status)) + { + CcUnpinData(Context); + return Status; + } + if (Found) { if (Parent && Parent->PathName) {
Modified: branches/pierre-fsd/drivers/filesystems/cdfs/fcb.c URL: http://svn.reactos.org/svn/reactos/branches/pierre-fsd/drivers/filesystems/c... ============================================================================== --- branches/pierre-fsd/drivers/filesystems/cdfs/fcb.c [iso-8859-1] (original) +++ branches/pierre-fsd/drivers/filesystems/cdfs/fcb.c [iso-8859-1] Wed Oct 29 04:44:28 2008 @@ -454,7 +454,8 @@ PDIR_RECORD Record; ULONG Offset; ULONG BlockOffset; - NTSTATUS Status; + NTSTATUS Status = STATUS_OBJECT_NAME_NOT_FOUND; + BOOLEAN Found;
LARGE_INTEGER StreamOffset; PVOID Context; @@ -539,8 +540,22 @@
DPRINT("ShortName '%wZ'\n", &ShortName);
- if (FsRtlIsNameInExpression(FileToFind, &LongName, TRUE, NULL) || - FsRtlIsNameInExpression(FileToFind, &ShortName, TRUE, NULL)) + _SEH_TRY + { + Found = FsRtlIsNameInExpression(FileToFind, &LongName, TRUE, NULL) || + FsRtlIsNameInExpression(FileToFind, &ShortName, TRUE, NULL); + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + if (!NT_SUCCESS(Status)) + { + CcUnpinData(Context); + return Status; + } + if (Found) { DPRINT("Match found, %S\n", Name); Status = CdfsMakeFCBFromDirEntry(DeviceExt, @@ -585,7 +600,7 @@
CcUnpinData(Context);
- return(STATUS_OBJECT_NAME_NOT_FOUND); + return Status; }
Modified: branches/pierre-fsd/drivers/filesystems/fastfat/create.c URL: http://svn.reactos.org/svn/reactos/branches/pierre-fsd/drivers/filesystems/f... ============================================================================== --- branches/pierre-fsd/drivers/filesystems/fastfat/create.c [iso-8859-1] (original) +++ branches/pierre-fsd/drivers/filesystems/fastfat/create.c [iso-8859-1] Wed Oct 29 04:44:28 2008 @@ -191,7 +191,7 @@ PVOID Context = NULL; PVOID Page; PVFATFCB rcFcb; - BOOLEAN Found; + BOOLEAN Found = FALSE; UNICODE_STRING PathNameU; UNICODE_STRING FileToFindUpcase; BOOLEAN WildCard; @@ -283,8 +283,22 @@ } if (WildCard) { - Found = FsRtlIsNameInExpression(&FileToFindUpcase, &DirContext->LongNameU, TRUE, NULL) || - FsRtlIsNameInExpression(&FileToFindUpcase, &DirContext->ShortNameU, TRUE, NULL); + _SEH_TRY + { + Found = FsRtlIsNameInExpression(&FileToFindUpcase, &DirContext->LongNameU, TRUE, NULL) || + FsRtlIsNameInExpression(&FileToFindUpcase, &DirContext->ShortNameU, TRUE, NULL); + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + if (!NT_SUCCESS(Status)) + { + RtlFreeUnicodeString(&FileToFindUpcase); + ExFreePool(PathNameBuffer); + return Status; + } } else {