From 48325f1f18dbcf9db50eecfd86a4468516e07d87 Mon Sep 17 00:00:00 2001 From: Stephen Langasek Date: Sat, 31 Oct 1998 12:10:08 +0000 Subject: [PATCH] Bugfix for fixup_imports: Enable checking for terminating import struct with Characteristics bitfield set to 0. --- loader/pe_image.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/loader/pe_image.c b/loader/pe_image.c index 5fe9df03eda..852e395fa18 100644 --- a/loader/pe_image.c +++ b/loader/pe_image.c @@ -238,8 +238,7 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm) if (!pe_imp) ERR(win32, "no import directory????\n"); - /* FIXME: should terminate on 0 Characteristics */ - for (i = 0; pe_imp->Name; pe_imp++) + for (i = 0; pe_imp->Name && pe_imp->u.Characteristics; pe_imp++) i++; /* Allocate module dependency list */ @@ -250,8 +249,7 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm) * 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++) { + for (i = 0, pe_imp = pem->pe_import; pe_imp->Name && pe_imp->u.Characteristics; pe_imp++) { HMODULE32 hImpModule; IMAGE_IMPORT_BY_NAME *pe_name; PIMAGE_THUNK_DATA import_list,thunk_list;