[ros-diffs] [cwittich] 43555: add some NULL checks

cwittich at svn.reactos.org cwittich at svn.reactos.org
Sun Oct 18 16:47:17 CEST 2009


Author: cwittich
Date: Sun Oct 18 16:47:16 2009
New Revision: 43555

URL: http://svn.reactos.org/svn/reactos?rev=43555&view=rev
Log:
add some NULL checks

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=43555&r1=43554&r2=43555&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] Sun Oct 18 16:47:16 2009
@@ -3272,6 +3272,9 @@
     TRACE("RegOpenKeyA hKey 0x%x lpSubKey %s phkResult %p\n",
           hKey, lpSubKey, phkResult);
 
+    if (!phkResult)
+        return ERROR_INVALID_PARAMETER;
+
     if (!hKey && lpSubKey && phkResult)
     {
         return ERROR_INVALID_HANDLE;
@@ -3307,6 +3310,9 @@
 {
     TRACE("RegOpenKeyW hKey 0x%x lpSubKey %S phkResult %p\n",
           hKey, lpSubKey, phkResult);
+
+    if (!phkResult)
+        return ERROR_INVALID_PARAMETER;
 
     if (!hKey && lpSubKey && phkResult)
     {




More information about the Ros-diffs mailing list