https://bugs.winehq.org/show_bug.cgi?id=47878
Bug ID: 47878 Summary: VirtualProtect across page boundaries does not work Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: c3210606@urhen.com Distribution: ---
Official VirtualProtect documentation states:
The size of the region whose access protection attributes are to be changed, in bytes. The region of affected pages includes all pages containing one or more bytes in the range from the lpAddress parameter to (lpAddress+dwSize). This means that a 2-byte range straddling a page boundary causes the protection attributes of both pages to be changed.
This however is not replicated in Wine as only the first page will have its protection changed and any pages after that resulting from the dwSize crossing the boundary will not be affected.