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

This commit is contained in:
Stefan Leichter 2012-06-21 23:11:19 +02:00 committed by Alexandre Julliard
parent a239e8ed27
commit c0e72bb362
1 changed files with 6 additions and 0 deletions

View File

@ -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)