[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-patches
Subject: comctl32: Do not crash, when the startpage is invalid
From: Detlef Riekenberg <wine.dev () web ! de>
Date: 2006-11-30 23:50:31
Message-ID: 1164930631.31125.14.camel () p4
[Download RAW message or body]
Native printui.dll(w2k) use 4 Propsheet, but set nPages to 5
Wine detected in PropsheetW, that nPages was wrong
(PROPSHEET_CollectPageInfo failed) and decremented
psInfo->nPages, but psInfo->active_page was out of
range in this case.
Reproduce the Bug:
"rundll32.exe printui.dll,PrintUIEntry /s /t 4"
Windows activates Page#0 on this command: We should do the same.
Changelog:
comctl32: Do not crash, when the startpage is invalid
--
By by ... Detlef
["0001-comctl32-Do-not-crash-when-the-startpage-is-invalid.txt" (0001-comctl32-Do-not-crash-when-the-startpage-is-invalid.txt)]
>From 5831e06311e8c169a0097a2d1e48e5f2dbfc26df Mon Sep 17 00:00:00 2001
From: Detlef Riekenberg <wine.dev@web.de>
Date: Fri, 1 Dec 2006 00:32:36 +0100
Subject: [PATCH] comctl32: Do not crash, when the startpage is invalid
---
dlls/comctl32/propsheet.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 7261d19..8490d74 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -2824,6 +2824,9 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHE
}
}
+ if (psInfo->active_page >= psInfo->nPages) psInfo->active_page = 0;
+ TRACE("startpage: %d of %d pages\n", psInfo->active_page, psInfo->nPages);
+
psInfo->unicode = FALSE;
psInfo->ended = FALSE;
@@ -2875,6 +2878,9 @@ INT_PTR WINAPI PropertySheetW(LPCPROPSHE
}
}
+ if (psInfo->active_page >= psInfo->nPages) psInfo->active_page = 0;
+ TRACE("startpage: %d of %d pages\n", psInfo->active_page, psInfo->nPages);
+
psInfo->unicode = TRUE;
psInfo->ended = FALSE;
--
1.4.1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic