Bugfix for fixup_imports: Enable checking for terminating import

struct with Characteristics bitfield set to 0.
This commit is contained in:
Stephen Langasek 1998-10-31 12:10:08 +00:00 committed by Alexandre Julliard
parent bf1bc516cc
commit 48325f1f18
1 changed files with 2 additions and 4 deletions

View File

@ -238,8 +238,7 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm)
if (!pe_imp) if (!pe_imp)
ERR(win32, "no import directory????\n"); ERR(win32, "no import directory????\n");
/* FIXME: should terminate on 0 Characteristics */ for (i = 0; pe_imp->Name && pe_imp->u.Characteristics; pe_imp++)
for (i = 0; pe_imp->Name; pe_imp++)
i++; i++;
/* Allocate module dependency list */ /* Allocate module dependency list */
@ -250,8 +249,7 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm)
* added to the modref list of the process. * added to the modref list of the process.
*/ */
/* FIXME: should terminate on 0 Characteristics */ for (i = 0, pe_imp = pem->pe_import; pe_imp->Name && pe_imp->u.Characteristics; pe_imp++) {
for (i = 0, pe_imp = pem->pe_import; pe_imp->Name; pe_imp++) {
HMODULE32 hImpModule; HMODULE32 hImpModule;
IMAGE_IMPORT_BY_NAME *pe_name; IMAGE_IMPORT_BY_NAME *pe_name;
PIMAGE_THUNK_DATA import_list,thunk_list; PIMAGE_THUNK_DATA import_list,thunk_list;