[MSGINA]
authorEric Kohl <eric.kohl@reactos.org>
Sun, 12 Jan 2014 21:23:01 +0000 (21:23 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 12 Jan 2014 21:23:01 +0000 (21:23 +0000)
Fix potential bug in ReadRegDwordKey.
CORE-7756 #resolve

svn path=/trunk/; revision=61594

reactos/dll/win32/msgina/msgina.c

index dd26272..e898dd9 100644 (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;