Nikolay Sivov : comctl32/propsheet: Avoid posting uninitialized data ( Valgrind).

Alexandre Julliard julliard at winehq.org
Mon Feb 25 15:10:34 CST 2019


Module: wine
Branch: master
Commit: 71004a825f166f8aa11ad15ecc23d7e4b1de7103
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=71004a825f166f8aa11ad15ecc23d7e4b1de7103

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Feb 25 11:37:33 2019 +0300

comctl32/propsheet: Avoid posting uninitialized data (Valgrind).

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46691
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/propsheet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 09a4551..88dab34 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -2760,7 +2760,7 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
 
 static INT do_loop(const PropSheetInfo *psInfo)
 {
-    MSG msg;
+    MSG msg = { 0 };
     INT ret = 0;
     HWND hwnd = psInfo->hwnd;
     HWND parent = psInfo->ppshheader.hwndParent;
@@ -2777,7 +2777,7 @@ static INT do_loop(const PropSheetInfo *psInfo)
         }
     }
 
-    if(ret == 0)
+    if(ret == 0 && msg.message)
         PostQuitMessage(msg.wParam);
 
     if(ret != -1)




More information about the wine-cvs mailing list