PE mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



some program I recently tested (DVD Shrink 2.0 not to name it) has a PE section with both attributes IMAGE_SCN_CNT_UNINITIALIZED_DATA and IMAGE_SCN_CNT_INITIALIZED_DATA set.
I assume we should map the section in this case (what we weren't doing). The program doesn't load yet (it will be fixed by some other patch)


A+

--
Eric Pouech
Name:          pe
ChangeLog:     fixed section mapping in PE loading when both IMAGE_SCN_CNT_UNINITIALIZED_DATA and IMAGE_SCN_CNT_INITIALIZED_DATA are set
License:       X11
GenDate:       2003/06/18 20:07:42 UTC
ModifiedFiles: dlls/ntdll/virtual.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/ntdll/virtual.c,v
retrieving revision 1.6
diff -u -u -r1.6 virtual.c
--- dlls/ntdll/virtual.c	8 May 2003 03:50:32 -0000	1.6
+++ dlls/ntdll/virtual.c	9 Jun 2003 08:14:52 -0000
@@ -658,7 +658,8 @@
                         sec->PointerToRawData, sec->SizeOfRawData,
                         sec->Characteristics );
 
-        if (sec->Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA) continue;
+        if ((sec->Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA) && 
+            !(sec->Characteristics & IMAGE_SCN_CNT_INITIALIZED_DATA)) continue;
         if (!sec->PointerToRawData || !sec->SizeOfRawData) continue;
 
         /* Note: if the section is not aligned properly VIRTUAL_mmap will magically

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux