Author: sginsberg
Date: Sat Sep 6 16:02:54 2008
New Revision: 36005
URL:
http://svn.reactos.org/svn/reactos?rev=36005&view=rev
Log:
- Make sure we get a Subkey in RegDeleteKeyA/W. Fixes Winetests causing a system crash,
but (for now) hides a bug in CM.
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…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Sat Sep 6 16:02:54 2008
@@ -1180,6 +1180,13 @@
HANDLE TargetKey;
NTSTATUS Status;
+ /* Make sure we got a subkey */
+ if (!lpSubKey)
+ {
+ /* Fail */
+ return ERROR_INVALID_PARAMETER;
+ }
+
Status = MapDefaultKey (&ParentKey,
hKey);
if (!NT_SUCCESS(Status))
@@ -1233,6 +1240,13 @@
HANDLE ParentKey;
HANDLE TargetKey;
NTSTATUS Status;
+
+ /* Make sure we got a subkey */
+ if (!lpSubKey)
+ {
+ /* Fail */
+ return ERROR_INVALID_PARAMETER;
+ }
Status = MapDefaultKey (&ParentKey,
hKey);