Commit c0e72bb3 authored by Stefan Leichter's avatar Stefan Leichter Committed by Alexandre Julliard

kernel32: Let K32EnumProcessModules fail if the last parameter is NULL.

parent a239e8ed
......@@ -1175,6 +1175,12 @@ BOOL WINAPI K32EnumProcessModules(HANDLE process, HMODULE *lphModule,
if (!init_module_iterator(&iter, process))
return FALSE;
if (!needed)
{
SetLastError(ERROR_NOACCESS);
return FALSE;
}
*needed = 0;
while ((ret = module_iterator_next(&iter)) > 0)
......
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