GDI bitmap tests

Кирилл Маргорин comargo at
Fri Nov 25 11:14:40 CST 2005


During research the crashing application I've found a problem that can
be easily reproduced by test attached.
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 <comargo at>
add test of LoadImage() and CopyImage() bunch to gdi/test/bitmap.c
Cyril Margorin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdi_test_bitmap.copyimage.diff
Type: application/octet-stream
Size: 921 bytes
Desc: not available
Url :

More information about the wine-patches mailing list