[PATCH] winex11.drv: Initialize biCompression when creating icons (valgrind).

Rémi Bernon rbernon at codeweavers.com
Mon Mar 8 02:14:23 CST 2021


  Conditional jump or move depends on uninitialised value(s)
     at 0x6C7D2EC7: bitmapinfoheader_from_user_bitmapinfo (dib.c:188)
     by 0x6C7D4D7E: GetDIBits (dib.c:1232)
     by 0x68D63707: create_icon_pixmaps.isra.0 (window.c:581)
     by 0x68D663B4: fetch_icon_data (window.c:665)
     by 0x68D692C4: X11DRV_WindowPosChanged (window.c:2491)
     by 0x6EB9BD64: set_window_pos (winpos.c:2233)
     by 0x6EB9DE63: USER_SetWindowPos (winpos.c:2312)
     by 0x6EB9C514: SetWindowPos (winpos.c:2402)
     by 0x6EB9CCCD: show_window (winpos.c:1130)
     by 0x6EB9D25A: ShowWindow (winpos.c:1232)
     by 0x6EB97245: WIN_CreateWindowEx (win.c:1713)
     by 0x6EB8F9BE: CreateWindowExW (win.c:1799)

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 dlls/winex11.drv/window.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index baaa30d74e3..ef7e24c579c 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -578,6 +578,7 @@ static BOOL create_icon_pixmaps( HDC hdc, const ICONINFO *icon, Pixmap *icon_ret
 
     info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
     info->bmiHeader.biBitCount = 0;
+    info->bmiHeader.biCompression = BI_RGB;
     if (!(lines = GetDIBits( hdc, icon->hbmColor, 0, 0, NULL, info, DIB_RGB_COLORS ))) goto failed;
     if (!(bits.ptr = HeapAlloc( GetProcessHeap(), 0, info->bmiHeader.biSizeImage ))) goto failed;
     if (!GetDIBits( hdc, icon->hbmColor, 0, lines, bits.ptr, info, DIB_RGB_COLORS )) goto failed;
-- 
2.30.0




More information about the wine-devel mailing list