From 0679fe11df2ddfbe577947bcad056ca677fb182d Mon Sep 17 00:00:00 2001 From: Tsarevich Dmitry Date: Tue, 18 Feb 2020 02:10:58 +0300 Subject: [PATCH] [ext2fs] fix Status control code not being checked * Status code assignation was removed when the original code was altered to use pfNtFsControlFile(). Fix that and also make the code more similar to other calls. * Closes #1459 --- src/ext2fs/nt_io.c | 6 ++---- src/rufus.rc | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/ext2fs/nt_io.c b/src/ext2fs/nt_io.c index 99643634..87dbb859 100644 --- a/src/ext2fs/nt_io.c +++ b/src/ext2fs/nt_io.c @@ -280,11 +280,9 @@ static __inline NTSTATUS _DismountDrive(IN HANDLE Handle) static __inline BOOLEAN _IsMounted(IN HANDLE Handle) { IO_STATUS_BLOCK IoStatusBlock; - NTSTATUS Status = STATUS_DLL_NOT_FOUND; PF_INIT(NtFsControlFile, NtDll); - if (pfNtFsControlFile != NULL) - pfNtFsControlFile(Handle, 0, 0, 0, &IoStatusBlock, FSCTL_IS_VOLUME_MOUNTED, 0, 0, 0, 0); - return (BOOLEAN)(Status == STATUS_SUCCESS); + return (pfNtFsControlFile == NULL) ? STATUS_DLL_NOT_FOUND : + (BOOLEAN)(pfNtFsControlFile(Handle, 0, 0, 0, &IoStatusBlock, FSCTL_IS_VOLUME_MOUNTED, 0, 0, 0, 0) == STATUS_SUCCESS); } static __inline NTSTATUS _CloseDisk(IN HANDLE Handle) diff --git a/src/rufus.rc b/src/rufus.rc index 8fc4a7f4..7462679a 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 232, 326 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 3.9.1620" +CAPTION "Rufus 3.9.1621" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -395,8 +395,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,9,1620,0 - PRODUCTVERSION 3,9,1620,0 + FILEVERSION 3,9,1621,0 + PRODUCTVERSION 3,9,1621,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -414,13 +414,13 @@ BEGIN VALUE "Comments", "https://rufus.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.9.1620" + VALUE "FileVersion", "3.9.1621" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2020 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "OriginalFilename", "rufus-3.9.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.9.1620" + VALUE "ProductVersion", "3.9.1621" END END BLOCK "VarFileInfo"