Fix potential bug in ReadRegDwordKey.
CORE-7756 #resolve

svn path=/trunk/; revision=61594
This commit is contained in:
Eric Kohl 2014-01-12 21:23:01 +00:00
parent 4ba150ba61
commit f1c6047311

View file

@ -102,7 +102,7 @@ ReadRegDwordKey(
cbData = sizeof(DWORD);
rc = RegQueryValueExW(hKey, pszKey, NULL, &dwType, (LPBYTE)&dwValue, &cbData);
if (rc == ERROR_SUCCESS)
if (rc == ERROR_SUCCESS && dwType == REG_DWORD)
*pValue = dwValue;
return ERROR_SUCCESS;