[NTOS:IO] Correctly deal with exceptions when handling FileFsDriverPathInformation. CID 1476847

This commit is contained in:
Thomas Faber
2021-10-28 11:23:02 -04:00
parent a74ff5be17
commit 34f2b7830d

View File

@@ -4259,7 +4259,7 @@ NtQueryVolumeInformationFile(IN HANDLE FileHandle,
/* This is to be handled by the kernel, not by FSD */
else if (FsInformationClass == FileFsDriverPathInformation)
{
PFILE_FS_DRIVER_PATH_INFORMATION DriverPathInfo;
_SEH2_VOLATILE PFILE_FS_DRIVER_PATH_INFORMATION DriverPathInfo = NULL;
_SEH2_TRY
{
@@ -4270,7 +4270,9 @@ NtQueryVolumeInformationFile(IN HANDLE FileHandle,
RtlCopyMemory(DriverPathInfo, FsInformation, Length);
/* Is the driver in the IO path? */
Status = IopGetDriverPathInformation(FileObject, DriverPathInfo, Length);
Status = IopGetDriverPathInformation(FileObject,
(PFILE_FS_DRIVER_PATH_INFORMATION)DriverPathInfo,
Length);
/* We failed, don't continue execution */
if (!NT_SUCCESS(Status))
{