From 24100643a9f9e9dfd5ee1c1a87a7e2c397669b66 Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Thu, 13 Oct 2016 19:57:29 +0000 Subject: [PATCH] [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 --- reactos/dll/win32/netcfgx/tcpipconf_notify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/netcfgx/tcpipconf_notify.c b/reactos/dll/win32/netcfgx/tcpipconf_notify.c index d7eebe252fc..85e8f829f30 100644 --- a/reactos/dll/win32/netcfgx/tcpipconf_notify.c +++ b/reactos/dll/win32/netcfgx/tcpipconf_notify.c @@ -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); }