RESEND: Write section access also assumes read access

Dmitry Timoshkov dmitry at baikal.ru
Mon Feb 16 21:38:13 CST 2004


Hello,

This patch fixes resource access for some (broken) DLLs, which
have only IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_WRITE
set in their .rsrc section. An example of such a DLL is fmres.dll
provided by FrameMaker.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Write section access also assumes read access.

--- cvs/hq/wine/dlls/ntdll/virtual.c	2004-02-12 15:35:46.000000000 +0800
+++ wine/dlls/ntdll/virtual.c	2004-02-17 11:29:43.000000000 +0800
@@ -763,7 +763,7 @@ static NTSTATUS map_image( HANDLE hmappi
         DWORD size = ROUND_SIZE( sec->VirtualAddress, sec->Misc.VirtualSize );
         BYTE vprot = VPROT_COMMITTED;
         if (sec->Characteristics & IMAGE_SCN_MEM_READ)    vprot |= VPROT_READ;
-        if (sec->Characteristics & IMAGE_SCN_MEM_WRITE)   vprot |= VPROT_WRITE|VPROT_WRITECOPY;
+        if (sec->Characteristics & IMAGE_SCN_MEM_WRITE)   vprot |= VPROT_READ|VPROT_WRITE|VPROT_WRITECOPY;
         if (sec->Characteristics & IMAGE_SCN_MEM_EXECUTE) vprot |= VPROT_EXEC;
 
         /* make sure the import directory is writable */






More information about the wine-patches mailing list