Ignore the size of the import directory, process imports until we find

a null entry.
This commit is contained in:
Alexandre Julliard 2005-10-04 15:54:55 +00:00
parent 80c60f5bad
commit c2bb910877
1 changed files with 3 additions and 9 deletions

View File

@ -588,15 +588,9 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path )
IMAGE_DIRECTORY_ENTRY_IMPORT, &size )))
return STATUS_SUCCESS;
nb_imports = size / sizeof(*imports);
for (i = 0; i < nb_imports; i++)
{
if (!imports[i].Name)
{
nb_imports = i;
break;
}
}
nb_imports = 0;
while (imports[nb_imports].Name && imports[nb_imports].FirstThunk) nb_imports++;
if (!nb_imports) return STATUS_SUCCESS; /* no imports */
/* Allocate module dependency list */