OLEAUT32: fix GIF palette allocation
Alex Villacís Lasso
a_villacis at palosanto.com
Mon Jul 18 12:51:46 CDT 2005
At last, I nailed down an issue on VB applications that used GIFs as
transparency-enabled icons in the Toolbar control. This is an ugly (and
randomly crashing) bug which manifests itself as black areas in GIF
icons. The root cause is that the SColorResolution component of
lib(un)gif reads the "color resolution" of an image, which is not always
a reliable way of finding the number of declared colors in the GIF
palette, especially when the GIF palette structure in lib(un)gif has a
ColorCount member. The net result was that the palette was
underallocated (for example, 128 entries allocated when up to 256 were
available), and then the image displayed black pixels corresponding to
accesses past the end of the allocated palette. This, of course, also
causes random crashes when the app is not lucky enough.
Changelog:
* fix GIF palette allocation, by relying on ColorCount instead of
SColorResolution
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-oleaut32-olepicture-gifpalette_A.patch
Type: text/x-patch
Size: 1454 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050718/946e525d/wine-oleaut32-olepicture-gifpalette_A.bin
More information about the wine-patches
mailing list