From db99cff20e85b5ecd54dd262d83bad6e2b9dda5f Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 9 Jun 2007 13:10:02 +0000 Subject: [PATCH] - If the module failed to load (e.g. fixup couldn't be done), then don't include it in the list of loaded modules. svn path=/trunk/; revision=27086 --- reactos/boot/freeldr/freeldr/arch/i386/loader.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/reactos/boot/freeldr/freeldr/arch/i386/loader.c b/reactos/boot/freeldr/freeldr/arch/i386/loader.c index b2a43d39b99..8f119502469 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/loader.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/loader.c @@ -655,7 +655,13 @@ FrLdrMapImage(IN FILE *Image, if (ImageType == 1) FrLdrLoadImage("hal.dll", 10, FALSE); /* Perform import fixups */ - LdrPEFixupImports(LoadBase, Name); + if (!NT_SUCCESS(LdrPEFixupImports(LoadBase, Name))) + { + /* Fixup failed, just don't include it in the list */ + // NextModuleBase = OldNextModuleBase; + LoaderBlock.ModsCount = ImageId; + return NULL; + } /* Return the final mapped address */ return LoadBase;