From f1c6047311a0d2af0d18c0e333c96288972d2b9a Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 12 Jan 2014 21:23:01 +0000 Subject: [PATCH] [MSGINA] Fix potential bug in ReadRegDwordKey. CORE-7756 #resolve svn path=/trunk/; revision=61594 --- reactos/dll/win32/msgina/msgina.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/msgina/msgina.c b/reactos/dll/win32/msgina/msgina.c index dd2627294dc..e898dd9ba67 100644 --- a/reactos/dll/win32/msgina/msgina.c +++ b/reactos/dll/win32/msgina/msgina.c @@ -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;