LoadImage (4bpp) / CopyImage() crashing
comargo at gmail.com
Fri Dec 9 16:12:23 CST 2005
Could anyone tell me, why function CopyImage uses
GetBitmapBits/SetBitmapBits, while MSDN marks these function as
I've tried to move from GetBitmapBits/SetBitmapBits to
GetDIBits/SetDIBits. It seems to me that this way is correct, if keep
in mind, that GetBitmapBits is wrong.
In attachment you may find a patch for it.
Am I wrong somewhere?
2005/11/25, Cyril Margorin <comargo at gmail.com>:
> During research the crashing application I've found a problem that can
> be easily reproduced by test.
> By investigation of problem I've found that original DIB bit depth is
> 4bpp, Physical pixmap bit depth is (equal to screen) 24bpp.
> In x11drv/bitmap.c X11_GetBitmapBits takes in account just only bit
> depth of physical pixmap, and copies it to provided buffer as-is.
> I.e. it tries to fill buffer with size (e.g.) 48x48x4bpp with
> 48x48x24bpp that causes buffer overrun and late falling in
> SetBitmapBits function.
> Cyril Margorin
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2001 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20051210/60efb88e/user_cursoricon_copyimage-0001.obj
More information about the wine-devel