http://bugs.winehq.org/show_bug.cgi?id=14861
--- Comment #14 from Rob Shearman robertshearman@gmail.com 2009-06-18 11:02:16 --- Reverting my commit will cause the Office 2007 installer to not work in certain situations. I forget the details but I believe it was either Mac OS X-specific or colour depth-specific.
A bit of background that may help: Wine doesn't currently deal with DIBs with an alpha channel properly as we use X11 to manipulate them and X11 doesn't support bitmaps with an alpha channel. Therefore, loading a DIB from disk and then calling SetDIBits on it causing the alpha data to be lost for the area in question, which the Office 2007 installer detected (it might have been gdiplus that specifically detected it) and caused it to raise an exception. This was kind of a hack to work around the lack of a DIB engine for this particular problem.
A better fix than reverting this commit would be to detect the two memory locations overlapping and not trigger this "optimisation" in this case.