Author: ekohl
Date: Mon May 9 10:26:55 2016
New Revision: 71299
URL:
http://svn.reactos.org/svn/reactos?rev=71299&view=rev
Log:
[NETAPI32]
Prevent dereferencing null-pointers.
Modified:
trunk/reactos/dll/win32/netapi32/local_group.c
trunk/reactos/dll/win32/netapi32/user.c
Modified: trunk/reactos/dll/win32/netapi32/local_group.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/local_g…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] Mon May 9 10:26:55 2016
@@ -1163,7 +1163,7 @@
// }
done:
- if (ApiStatus == NERR_Success && EnumContext->Phase != DonePhase)
+ if (ApiStatus == NERR_Success && EnumContext != NULL &&
EnumContext->Phase != DonePhase)
ApiStatus = ERROR_MORE_DATA;
if (EnumContext != NULL)
Modified: trunk/reactos/dll/win32/netapi32/user.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/user.c?…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/user.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/user.c [iso-8859-1] Mon May 9 10:26:55 2016
@@ -2554,7 +2554,7 @@
// }
done:
- if (ApiStatus == NERR_Success && EnumContext->Index <
EnumContext->Count)
+ if (ApiStatus == NERR_Success && EnumContext != NULL &&
EnumContext->Index < EnumContext->Count)
ApiStatus = ERROR_MORE_DATA;
if (EnumContext != NULL)