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…
==============================================================================
--- 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)
{