[PATCH] hhctrl: add check for command-line arguments
Wolfram Sang
wolfram at the-dreams.de
Sun Aug 22 13:40:48 CDT 2010
If the commandline is just '\0', hh.exe crashes like:
~$ wine hh.exe
fixme:htmlhelp:HtmlHelpW Not all HH cases handled correctly
wine: Unhandled page fault on read access to 0x0000000c at address 0x7e9e8747 (thread 0009), starting debugger...
Fixes Bug 19070.
Signed-off-by: Wolfram Sang <wolfram at the-dreams.de>
---
dlls/hhctrl.ocx/hhctrl.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c
index 9ab66de..5c02313 100644
--- a/dlls/hhctrl.ocx/hhctrl.c
+++ b/dlls/hhctrl.ocx/hhctrl.c
@@ -278,6 +278,9 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
hh_process = TRUE;
+ if (!*szCmdLine)
+ return 0;
+
/* Parse command line option of the HTML Help command.
*
* Note: The only currently handled action is "mapid",
--
1.7.1
More information about the wine-patches
mailing list