Author: fireball
Date: Sat Jun 9 17:10:02 2007
New Revision: 27086
URL:
http://svn.reactos.org/svn/reactos?rev=27086&view=rev
Log:
- If the module failed to load (e.g. fixup couldn't be done), then don't include
it in the list of loaded modules.
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c Sat Jun 9 17:10:02 2007
@@ -655,7 +655,13 @@
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;