mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-09-20 12:56:19 +02:00
Windows: Don't write extra 0x00 byte at the end of DcsProp file when modifying it through UI
This commit is contained in:
parent
14a477026d
commit
b233e6776b
@ -11732,13 +11732,14 @@ static BOOL CALLBACK BootLoaderPreferencesDlgProc (HWND hwndDlg, UINT msg, WPARA
|
||||
|
||||
while (TextEditDialogBox(FALSE, hwndDlg, GetString ("BOOT_LOADER_CONFIGURATION_FILE"), dcsprop) == IDOK)
|
||||
{
|
||||
if (0 == strcmp(dcsprop.c_str(), currentDcsprop.c_str()))
|
||||
const char* dcspropContent = dcsprop.c_str();
|
||||
if (0 == strcmp(dcspropContent, currentDcsprop.c_str()))
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (validateDcsPropXml (dcsprop.c_str()))
|
||||
else if (validateDcsPropXml (dcspropContent))
|
||||
{
|
||||
WriteESPFile (L"\\EFI\\VeraCrypt\\DcsProp", (LPBYTE) dcsprop.c_str(), (DWORD) dcsprop.size(), true);
|
||||
WriteESPFile (L"\\EFI\\VeraCrypt\\DcsProp", (LPBYTE) dcspropContent, (DWORD) strlen (dcspropContent), true);
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user