[ros-diffs] [spetreolle] 40979: Fix 2 advapi32:reg winetests registry.c:1229: Test failed: Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got 161 registry.c:956: Test failed: expected ERROR_INVALID_PARAMETER, got 998 by Victor Martinez(vicmarcal at hotmail.com) bug 4527
spetreolle at svn.reactos.org
spetreolle at svn.reactos.org
Tue May 19 16:24:09 CEST 2009
Author: spetreolle
Date: Tue May 19 18:24:08 2009
New Revision: 40979
URL: http://svn.reactos.org/svn/reactos?rev=40979&view=rev
Log:
Fix 2 advapi32:reg winetests
registry.c:1229: Test failed: Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got 161
registry.c:956: Test failed: expected ERROR_INVALID_PARAMETER, got 998
by Victor Martinez(vicmarcal at hotmail.com)
bug 4527
Modified:
trunk/reactos/dll/win32/advapi32/reg/reg.c
Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg.c?rev=40979&r1=40978&r2=40979&view=diff
==============================================================================
--- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Tue May 19 18:24:08 2009
@@ -3338,6 +3338,10 @@
TRACE("RegOpenKeyExA hKey 0x%x lpSubKey %s ulOptions 0x%x samDesired 0x%x phkResult %p\n",
hKey, lpSubKey, ulOptions, samDesired, phkResult);
+ if (!phkResult)
+ {
+ return ERROR_INVALID_PARAMETER;
+ }
Status = MapDefaultKey(&KeyHandle,
hKey);
@@ -3389,6 +3393,10 @@
TRACE("RegOpenKeyExW hKey 0x%x lpSubKey %S ulOptions 0x%x samDesired 0x%x phkResult %p\n",
hKey, lpSubKey, ulOptions, samDesired, phkResult);
+ if (!phkResult)
+ {
+ return ERROR_INVALID_PARAMETER;
+ }
Status = MapDefaultKey(&KeyHandle, hKey);
if (!NT_SUCCESS(Status))
@@ -4265,7 +4273,10 @@
TRACE("hKey 0x%X lpSubKey %S lpValue %p lpcbValue %d\n",
hKey, lpSubKey, lpValue, lpcbValue ? *lpcbValue : 0);
-
+ if (hKey == NULL)
+ {
+ return ERROR_INVALID_HANDLE;
+ }
Status = MapDefaultKey(&KeyHandle,
hKey);
if (!NT_SUCCESS(Status))
More information about the Ros-diffs
mailing list