[PATCH] user32: check for valid pointer in CreateIconFromResource

Alexandre Julliard julliard at winehq.org
Mon Jun 28 06:59:58 CDT 2010


Reece Dunn <msclrhd at googlemail.com> writes:

> When running winedbg on bfginstaller.exe (trying to track down
> http://bugs.winehq.org/show_bug.cgi?id=14343), winedbg will trap in
> the cursoricon.c code (line 771 --
> http://source.winehq.org/git/wine.git/?a=blob;f=dlls/user32/cursoricon.c;h=9a1810e22a1a77c698a14e0d6a9a33c5d036bce0;hb=d474d3f142b6e5f50ca3253cd170695ac3cc8930#l771):
>
>  767     /* pre-multiply by alpha */
>  768     for (i = 0, ptr = bits; i < bm.bmWidth * bm.bmHeight; i++, ptr += 4)
>  769     {
>  770         unsigned int alpha = ptr[3];
>  771         ptr[0] = ptr[0] * alpha / 255;
>  772         ptr[1] = ptr[1] * alpha / 255;
>  773         ptr[2] = ptr[2] * alpha / 255;
>  774     }
>
> The app itself does not crash there when not running without winedbg,
> but is generating an issue later on that does not make sense (which I
> am suspecting is a stack corruption issue, possibly triggered by this
> issue).

That's a DIB exception. Perfectly normal, and nothing whatsoever to do
with the patch.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list