wine/dlls/gdi32
Zhiyi Zhang 36366f129b win32u: Find the correct DIB driver in windrv_CreateDC().
push_dc_driver() places drivers based on their priorities, so the newly created driver is not
necessarily on top. Thus in windrv_CreateDC(), find_dc_driver() should be used to find the DIB
driver instead of assuming the DIB driver is the top driver, which could be the path driver because
it has a higher priority.

The exact wrong code path was:
1. A path driver with priority 400 is created for a DC.
2. windrv_CreateDC() is called to create a window driver for the DC.
3. Then in dibdrv_CreateDC(), push_dc_driver() is called with 'dev' pointing to the top driver, which is the path driver.
4. push_dc_driver() updates 'dev' to point to the address of the next driver because DIB driver has a lower 300 priority.
5. The DIB driver is assigned to 'dev', which is not the original parameter passed into push_dc_driver().
6. In windrv_CreateDC(), get_dibdrv_pdev(*dev) is called, assuming the top driver is the DIB driver. But actually the top
   driver that '*dev' points to is still the path driver.

The added tests can demonstrate the memory corruption before this fix is applied.
2023-12-04 22:10:20 +01:00
..
tests win32u: Find the correct DIB driver in windrv_CreateDC(). 2023-12-04 22:10:20 +01:00
uniscribe nls: Update character tables to Unicode 15.1.0. 2023-09-30 13:23:19 +02:00
dc.c gdi32: Fix leak in GdiDeleteSpoolFileHandle. 2023-10-17 18:18:10 +02:00
emfdc.c gdi32: Add ETO_PDY flag support in EMFDC_ExtTextOut. 2023-11-30 23:12:54 +01:00
enhmetafile.c gdi32/emf: Fix miter limit serialization. 2023-10-09 11:38:09 +02:00
gdi32.rc
gdi32.spec gdi32: Add GdiGetDevmodeForPage stub. 2023-10-11 17:28:14 +02:00
gdi_private.h gdi32/emf: Add SetBrushOrgEx() recording. 2023-10-10 23:15:05 +02:00
icm.c
Makefile.in makefiles: Always use the global SOURCES variable for .rc files. 2023-11-01 22:43:56 +01:00
metadc.c
metafile.c gdi32: Fix METADC handling in PlayMetaFile. 2023-10-11 17:27:40 +02:00
objects.c gdi32: Make GetStockObject hotpatchable. 2023-09-19 16:59:45 +02:00
opengl.c
resource.h
text.c