http://bugs.winehq.org/show_bug.cgi?id=3336
------- Additional Comments From pete4abw@comcast.net 2005-17-09 07:10 ------- https://bugs.freedesktop.org/show_bug.cgi?id=594, comment 25 seems to bring up an issue:
------- Additional comment #25 from Egbert Eich on 2005-09-13 03:55 [reply] -------
To round this up here is the explanation for the devision by 4 in: + if (paddedWidth / 4 > 32767 || height > 32767) + return NullPixmap;
We must meet the condition: paddedWidth * height <= ((1 << (sizeof(size_t) << 3)) - 1) so that we don't cause an overflow in the argument of a subsequent malloc() and end up allocating less than the required amount. size_t should be at least unsigned int therefore the maximum value it can hold would be: 32767^2 * 4. height needs to be <= 32767 as it needs to fit into a short. This condition should have been tested in the calling function - we do it here again for safety. ------------------------ Apparently, this divide/multiply by 4 is causing the problem. There is no official revised patch yet. I know the gentoo dev implemented it and I "heard" it works, but it has not been released yet.