Commit c3f95edd authored by Olivier F. R. Dierick's avatar Olivier F. R. Dierick Committed by Alexandre Julliard

kernel32: Fail gracefully in K32EnumProcessModules with NULL pointer.

parent bbf5b249
......@@ -1226,7 +1226,7 @@ BOOL WINAPI K32EnumProcessModules(HANDLE process, HMODULE *lphModule,
if (!init_module_iterator(&iter, process))
return FALSE;
if (!needed)
if ((cb && !lphModule) || !needed)
{
SetLastError(ERROR_NOACCESS);
return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment