[PATCH] ntdll: Fix the protection of a mapped copy-on-write view of a file.

Michael Roy mclroy at gmail.com
Wed Nov 5 08:57:27 CST 2008


Fix bug#: 12282

Oracle Forms Runtime loads a compiled form and creates
(CreateFileMapping) a file mapping object with PAGE_READONLY
protection, then Forms calls MapViewOfFile with PAGE_WRITECOPY to map
the object.
After that Forms crashes happily on the write access to the mapped pages.
MapViewOfFile calls NtMapViewOfSection which gets a protection mode
for the mapped pages from the file mapping object which lacks
PAGE_WRITECOPY protection in this case.
So NtMapViewOfSection has to sync the derived protection with its
"protect" parameter.
The workaround for the bug was to run Forms under Wine in Win95 mode,
but then some features (e.g, UTF8) were unavailable.
I think some applications may benefit from the patch.

Changelog:
dlls/ntdll/virtual.c
ntdll: Fix the protection of a mapped copy-on-write view of a file.

Michael Roy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ntdll-Fix-the-protection-of-a-mapped-copy-on-write.patch
Type: application/octet-stream
Size: 1482 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20081105/c13d1f69/attachment.obj 


More information about the wine-patches mailing list