diff options
Diffstat (limited to 'src/Format')
-rw-r--r-- | src/Format/Format.rc | 8 | ||||
-rw-r--r-- | src/Format/InPlace.c | 23 | ||||
-rw-r--r-- | src/Format/Tcformat.c | 6 |
3 files changed, 21 insertions, 16 deletions
diff --git a/src/Format/Format.rc b/src/Format/Format.rc index 3250ca30..46e811b7 100644 --- a/src/Format/Format.rc +++ b/src/Format/Format.rc @@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,26,6,0 - PRODUCTVERSION 1,26,6,0 + FILEVERSION 1,26,10,0 + PRODUCTVERSION 1,26,10,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -46,11 +46,11 @@ BEGIN BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCrypt Format" - VALUE "FileVersion", "1.26.6" + VALUE "FileVersion", "1.26.10" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "VeraCrypt Format.exe" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.26.6" + VALUE "ProductVersion", "1.26.10" END END BLOCK "VarFileInfo" diff --git a/src/Format/InPlace.c b/src/Format/InPlace.c index 877ff7eb..b1483631 100644 --- a/src/Format/InPlace.c +++ b/src/Format/InPlace.c @@ -2208,24 +2208,27 @@ BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId newWipeAlgorithm, // SetFilePointerEx() with FILE_BEGIN as the reference point, reaching the end of large drives // during in-place encryption can cause significant slowdowns. By moving the file pointer // relatively, these performance issues are mitigated. +// +// We fall back to absolute positioning if the relative positioning fails. BOOL MoveFilePointer (HANDLE dev, LARGE_INTEGER offset) { LARGE_INTEGER currOffset; LARGE_INTEGER diffOffset; currOffset.QuadPart = 0; - if (SetFilePointerEx (dev, currOffset, &currOffset, FILE_CURRENT) == 0) - return FALSE; - - diffOffset.QuadPart = offset.QuadPart - currOffset.QuadPart; - if (diffOffset.QuadPart == 0) - return TRUE; + if (SetFilePointerEx (dev, currOffset, &currOffset, FILE_CURRENT)) + { + diffOffset.QuadPart = offset.QuadPart - currOffset.QuadPart; + if (diffOffset.QuadPart == 0) + return TRUE; - // Moves the file pointer by the difference between current and desired positions - if (SetFilePointerEx (dev, diffOffset, NULL, FILE_CURRENT) == 0) - return FALSE; + // Moves the file pointer by the difference between current and desired positions + if (SetFilePointerEx (dev, diffOffset, NULL, FILE_CURRENT)) + return TRUE; + } - return TRUE; + // An error occurred, fallback to absolute positioning + return SetFilePointerEx (dev, offset, NULL, FILE_BEGIN); } // Repairs damaged sectors (i.e. those with read errors) by zeroing them. diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index aa28d5ee..658d3797 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -4475,9 +4475,11 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } SetFocus (GetDlgItem (hwndDlg, IDC_PIM)); - + #ifndef WOLFCRYPT_BACKEND SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (SysEncInEffect () && hash_algo != SHA512 && hash_algo != WHIRLPOOL? "PIM_SYSENC_HELP" : "PIM_HELP")); - + #else + SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (SysEncInEffect () && hash_algo != SHA512? "PIM_SYSENC_HELP" : "PIM_HELP")); + #endif ToHyperlink (hwndDlg, IDC_LINK_PIM_INFO); if (CreatingHiddenSysVol()) |