diff --git a/src/drive.c b/src/drive.c index 10b23037..2f509057 100644 --- a/src/drive.c +++ b/src/drive.c @@ -172,7 +172,7 @@ static HANDLE GetHandle(char* Path, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWr bWriteShare = TRUE; // Try to report the process that is locking the drive // We also use bit 6 as a flag to indicate that SearchProcess was called. - access_mask = SearchProcess(DevPath, 5000, TRUE, TRUE, FALSE) | 0x40; + access_mask = SearchProcess(DevPath, SEARCH_PROCESS_TIMEOUT, TRUE, TRUE, FALSE) | 0x40; } Sleep(DRIVE_ACCESS_TIMEOUT / DRIVE_ACCESS_RETRIES); } @@ -202,7 +202,7 @@ static HANDLE GetHandle(char* Path, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWr uprintf("Could not lock access to %s: %s", Path, WindowsErrorString()); // See if we can report the processes are accessing the drive if (!IS_ERROR(FormatStatus) && (access_mask == 0)) - access_mask = SearchProcess(DevPath, 5000, TRUE, TRUE, FALSE); + access_mask = SearchProcess(DevPath, SEARCH_PROCESS_TIMEOUT, TRUE, TRUE, FALSE); // Try to continue if the only access rights we saw were for read-only if ((access_mask & 0x07) != 0x01) safe_closehandle(hDrive); diff --git a/src/rufus.c b/src/rufus.c index 4f18f21b..17bc9de4 100755 --- a/src/rufus.c +++ b/src/rufus.c @@ -959,7 +959,7 @@ static void CALLBACK BlockingTimer(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD #define PRINT_ISO_PROP(b, ...) do {if (b) uprintf(__VA_ARGS__);} while(0) static void DisplayISOProps(void) { - static char* inst_str = "[1/#]"; + static char inst_str[] = " [1/#]"; int i; uprintf("ISO label: '%s'", img_report.label); @@ -995,7 +995,7 @@ static void DisplayISOProps(void) HAS_BOOTMGR_BIOS(img_report) ? (HAS_BOOTMGR_EFI(img_report) ? "BIOS and UEFI" : "BIOS only") : "UEFI only"); PRINT_ISO_PROP(HAS_WINPE(img_report), " Uses: WinPE %s", (img_report.uses_minint) ? "(with /minint)" : ""); if (HAS_WININST(img_report)) { - inst_str[3] = '0' + img_report.wininst_index; + inst_str[4] = '0' + img_report.wininst_index; uprintf(" Uses: Install.%s%s (version %d.%d.%d%s)", &img_report.wininst_path[0][strlen(img_report.wininst_path[0]) - 3], (img_report.wininst_index > 1) ? inst_str : "", (img_report.wininst_version >> 24) & 0xff, (img_report.wininst_version >> 16) & 0xff, (img_report.wininst_version >> 8) & 0xff, diff --git a/src/rufus.h b/src/rufus.h index e4600357..2b08829a 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -76,7 +76,8 @@ #define MORE_INFO_URL 0xFFFF #define STATUS_MSG_TIMEOUT 3500 // How long should cheat mode messages appear for on the status bar #define WRITE_RETRIES 4 -#define WRITE_TIMEOUT 5000 // How long we should wait between write retries +#define WRITE_TIMEOUT 5000 // How long we should wait between write retries (in ms) +#define SEARCH_PROCESS_TIMEOUT 10000 // How long we should search for conflicting processes before giving up (in ms) #define MARQUEE_TIMER_REFRESH 10 // Time between progress bar marquee refreshes, in ms #define FS_DEFAULT FS_FAT32 #define SINGLE_CLUSTERSIZE_DEFAULT 0x00000100 diff --git a/src/rufus.rc b/src/rufus.rc index 60b1b063..eb9c0cb2 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.5.1442" +CAPTION "Rufus 3.5.1443" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -394,8 +394,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,5,1442,0 - PRODUCTVERSION 3,5,1442,0 + FILEVERSION 3,5,1443,0 + PRODUCTVERSION 3,5,1443,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -413,13 +413,13 @@ BEGIN VALUE "Comments", "https://akeo.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.5.1442" + VALUE "FileVersion", "3.5.1443" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus-3.5.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.5.1442" + VALUE "ProductVersion", "3.5.1443" END END BLOCK "VarFileInfo" diff --git a/src/stdfn.c b/src/stdfn.c index 17a46341..142d4909 100644 --- a/src/stdfn.c +++ b/src/stdfn.c @@ -255,7 +255,7 @@ void GetWindowsVersion(void) OSVERSIONINFOEXA vi, vi2; const char* w = 0; const char* w64 = "32 bit"; - char *vptr, build_number[10] = ""; + char *vptr; size_t vlen; unsigned major, minor; ULONGLONG major_equal, minor_equal;