http://bugs.winehq.org/show_bug.cgi?id=28754
Bug #: 28754 Summary: In comdl32/tests/itemdlg.ok, update_layout() uses uninitialized window rect Product: Wine Version: 1.3.30 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: comdlg32 AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com Classification: Unclassified
Running "make itemdlg.ok" in comdlg32/tests, valgrind complains
Conditional jump or move depends on uninitialised value(s) at update_layout (itemdlg.c:1114) by IFileDialog2_fnSetFileNameLabel (itemdlg.c:1968) by IFileOpenDialog_fnSetFileNameLabel (itemdlg.c:2231) by func_itemdlg (itemdlg.c:714) by run_test (test.h:556) by main (test.h:624) Uninitialised value was created by a stack allocation at update_layout (itemdlg.c:1098)
and a cascade of uninitialized values ensues that would be hard to write a suppression for. The uninitilialized value happens because update_layout() calls GetClientRect on This->dlg_hwnd, which is NULL, and doesn't check whether it succeeded.
The attached patch makes all the warnings go away, but I don't know if it's the right thing to do.