Merge commit 'f81b84d64d895cc87ecb7e3b4d9b9b2ce73bef4b' into feature/update-dependencies

This commit is contained in:
Sergey Abramchuk
2020-08-18 13:48:40 +03:00
9 changed files with 61 additions and 13 deletions
+3 -2
View File
@@ -288,15 +288,16 @@ namespace openvpn {
continue;
wchar_t wbuf[256] = L"";
DWORD cbwbuf = sizeof(wbuf);
status = ::RegQueryValueExW(connection_key(),
L"Name",
nullptr,
&data_type,
(LPBYTE)wbuf,
&len);
&cbwbuf);
if (status != ERROR_SUCCESS || data_type != REG_SZ)
continue;
wbuf[(sizeof(wbuf) / sizeof(wchar_t)) - 1] = L'\0';
wbuf[(cbwbuf / sizeof(wchar_t)) - 1] = L'\0';
// iterate through self and try to patch the name
{