http://bugs.winehq.org/show_bug.cgi?id=16911
--- Comment #1 from Lei Zhang thestig@google.com 2009-01-12 18:52:37 --- Created an attachment (id=18661) --> (http://bugs.winehq.org/attachment.cgi?id=18661) proposed patch
Now, I don't completely understand all code involved here, but it seems the simplest way to fix this is to not leave 'mem' with permissions set to PAGE_NOACCESS at the end of X11DRV_SetDIBits().
The attached patch sets the permissions to PAGE_READONLY, which fixes the problem for me. This patch doesn't break any other unit tests in Wine, which tells me it's not obviously wrong, but I'm not sure if it's correct, so comments are welcome.