mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: Don't write extra 0x00 byte at the end of DcsProp file when modifying it through UI
This commit is contained in:
@@ -11732,13 +11732,14 @@ static BOOL CALLBACK BootLoaderPreferencesDlgProc (HWND hwndDlg, UINT msg, WPARA
|
|||||||
|
|
||||||
while (TextEditDialogBox(FALSE, hwndDlg, GetString ("BOOT_LOADER_CONFIGURATION_FILE"), dcsprop) == IDOK)
|
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;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user