[NETCFGX] RegQueryValueExW accepts a size in bytes, not TCHARS. Also, this local buffer probably shouldnt be used. Uncovered by Victor Martinez Calvo. CORE-9665

svn path=/trunk/; revision=72965
This commit is contained in:
Mark Jansen 2016-10-13 19:57:29 +00:00
parent 6031bd0162
commit 24100643a9

View file

@ -2710,8 +2710,8 @@ LoadDNSSettings(
RegQueryValueExW(hKey, L"RegisterAdapterName", NULL, NULL, (LPBYTE)&This->pCurrentConfig->pDNS->RegisterAdapterName, &dwSize);
RegQueryValueExW(hKey, L"RegistrationEnabled", NULL, NULL, (LPBYTE)&This->pCurrentConfig->pDNS->RegistrationEnabled, &dwSize);
dwSize = sizeof(This->pCurrentConfig->pDNS->szDomain) / sizeof(WCHAR);
RegQueryValueExW(hKey, L"Domain", NULL, NULL, (LPBYTE)szBuffer, &dwSize);
dwSize = sizeof(This->pCurrentConfig->pDNS->szDomain);
RegQueryValueExW(hKey, L"Domain", NULL, NULL, (LPBYTE)This->pCurrentConfig->pDNS->szDomain, &dwSize);
RegCloseKey(hKey);
}