mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
Fix (registry.c:325, dated 20050425) test failure. Description: Added RegOpenKeyA/W check for input param (if it's NULL pointer, returning error)
svn path=/trunk/; revision=14849
This commit is contained in:
parent
492c96c8f9
commit
23c9abb0b3
1 changed files with 8 additions and 0 deletions
|
@ -1731,6 +1731,10 @@ RegOpenKeyA (HKEY hKey,
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT("RegOpenKeyA hKey 0x%x lpSubKey %s phkResult %p\n", hKey, lpSubKey, phkResult);
|
DPRINT("RegOpenKeyA hKey 0x%x lpSubKey %s phkResult %p\n", hKey, lpSubKey, phkResult);
|
||||||
|
|
||||||
|
// Check input params
|
||||||
|
if (phkResult == NULL) return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
Status = MapDefaultKey (&KeyHandle,
|
Status = MapDefaultKey (&KeyHandle,
|
||||||
hKey);
|
hKey);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -1782,6 +1786,10 @@ RegOpenKeyW (HKEY hKey,
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT("RegOpenKeyW hKey 0x%x lpSubKey %S phkResult %p\n", hKey, lpSubKey, phkResult);
|
DPRINT("RegOpenKeyW hKey 0x%x lpSubKey %S phkResult %p\n", hKey, lpSubKey, phkResult);
|
||||||
|
|
||||||
|
// Check input params
|
||||||
|
if (phkResult == NULL) return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
Status = MapDefaultKey (&KeyHandle,
|
Status = MapDefaultKey (&KeyHandle,
|
||||||
hKey);
|
hKey);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
|
Loading…
Reference in a new issue