Author: fireball
Date: Fri Feb 26 23:52:55 2010
New Revision: 45690
URL:
http://svn.reactos.org/svn/reactos?rev=45690&view=rev
Log:
[NTDLL]
- LdrpProcessImportDirectoryEntry: Don't try to fixup functions if an import address
table is empty. Fixes Panzer General 2. Most of the work of discovering, fixing and
testing this problem was performed by Olaf Siejka.
Modified:
trunk/reactos/dll/ntdll/ldr/utils.c
Modified: trunk/reactos/dll/ntdll/ldr/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/utils.c?rev=…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] Fri Feb 26 23:52:55 2010
@@ -1599,6 +1599,9 @@
{
IATSize++;
}
+
+ /* No need to fixup anything if IAT is empty */
+ if (IATSize == 0) return STATUS_SUCCESS;
/* Unprotect the region we are about to write into. */
IATBase = (PVOID)ImportAddressList;