Commit 48325f1f authored by Stephen Langasek's avatar Stephen Langasek Committed by Alexandre Julliard

Bugfix for fixup_imports: Enable checking for terminating import

struct with Characteristics bitfield set to 0.
parent bf1bc516
...@@ -238,8 +238,7 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm) ...@@ -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) ...@@ -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;
......
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