Author: mjansen
Date: Thu Oct 13 19:57:29 2016
New Revision: 72965
URL:
http://svn.reactos.org/svn/reactos?rev=72965&view=rev
Log:
[NETCFGX] RegQueryValueExW accepts a size in bytes, not TCHARS. Also, this local buffer
probably shouldnt be used. Uncovered by Victor Martinez Calvo. CORE-9665
Modified:
trunk/reactos/dll/win32/netcfgx/tcpipconf_notify.c
Modified: trunk/reactos/dll/win32/netcfgx/tcpipconf_notify.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/tcpipcon…
==============================================================================
--- trunk/reactos/dll/win32/netcfgx/tcpipconf_notify.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netcfgx/tcpipconf_notify.c [iso-8859-1] Thu Oct 13 19:57:29
2016
@@ -2710,8 +2710,8 @@
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);
}