[Bug 39373] New: create_icon_pixmaps passes an uninitialized info parameter to GetDIBits

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Oct 2 22:55:12 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=39373

            Bug ID: 39373
           Summary: create_icon_pixmaps passes an uninitialized info
                    parameter to GetDIBits
           Product: Wine
           Version: 1.7.52
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: -unknown
          Assignee: wine-bugs at winehq.org
          Reporter: alexhenrie24 at gmail.com
      Distribution: ---

`valgrind --trace-children=yes
--vex-iropt-register-updates=allregs-at-mem-access --workaround-gcc296-bugs=yes
--leak-check=full -v --track-origins=yes ./wine
dlls/user32/tests/user32_test.exe.so cursoricon` revealed the following:

==6427== 1 errors in context 1 of 14:
==6427== Conditional jump or move depends on uninitialised value(s)
==6427==    at 0x56A97A8: bitmapinfoheader_from_user_bitmapinfo (dib.c:182)
==6427==    by 0x56AC285: GetDIBits (dib.c:1217)
==6427==    by 0x6248944: create_icon_pixmaps.isra.9 (window.c:555)
==6427==    by 0x624A715: fetch_icon_data (window.c:639)
==6427==    by 0x624CF40: X11DRV_WindowPosChanged (window.c:2374)
==6427==    by 0x54D3FA6: set_window_pos (winpos.c:2147)
==6427==    by 0x54D65C9: USER_SetWindowPos (winpos.c:2220)
==6427==    by 0x54D41CD: SetWindowPos (winpos.c:2294)
==6427==    by 0x54D55A1: show_window (winpos.c:1122)
==6427==    by 0x54D5847: ShowWindow (winpos.c:1220)
==6427==    by 0x54D02A7: WIN_CreateWindowEx (win.c:1666)
==6427==    by 0x54C9E28: CreateWindowExA (win.c:1718)
==6427==  Uninitialised value was created by a stack allocation
==6427==    at 0x6248875: create_icon_pixmaps.isra.9 (window.c:539)

GetDIBits has the following documentation:

BITMAPINFO * info, /* [out] Address of structure with bitmap data */

But in reality, info is [in/out] -- GetDIBits is definitely making decisions
based on the initial value of info.

I do not really understand this code and I am not sure that just zero-filling
info is the best solution to this problem. Thoughts?

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list