http://bugs.winehq.org/show_bug.cgi?id=6961
Summary: Page fault in IWineGDISurfaceImpl_Blt Product: Wine Version: CVS Platform: All OS/Version: other Status: UNCONFIRMED Severity: major Priority: P2 Component: wine-directx-ddraw AssignedTo: wine-bugs@winehq.org ReportedBy: baerwulf@iinet.net.au
When windows game "Empire Earth II" calls the Blt method of DirectDrawSurface7 it results in a page fault. this was traced to wined3d/surface_gdi.c IWineGDISurfaceImpl_Blt where it appears that the .Pitch of the surface that is being copied to is different to the width of the rectangle and as such attempts to memcpy to an address range that is outside of the surface. I am unsure of whether this is a bug in wine or a "Feature" of Microsoft's DirectX. the attached patch fixes the problem when compiled with preprocessor flag -DEE2BLTBUGFIX. This patch was created as a preprocessor option to avoid breaking other programs. Other subsections of this method may still contain a similar bug (i.e. when Blt is called with other Flags). Other bug reports appear to show similar problems in other programs.