http://bugs.winehq.org/show_bug.cgi?id=23247
Summary: hhctrl.ocx - crash when showing HTML help Product: Wine Version: 1.2-rc4 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: hhctrl.ocx AssignedTo: wine-bugs@winehq.org ReportedBy: a213391@bofthew.com
Created an attachment (id=28944) --> (http://bugs.winehq.org/attachment.cgi?id=28944) Patch to fix the problem
In dll hhctrl.ocx, there is bug causing wine crash when showing HTML help. In file dlls/hhctrl.ocx/help.c, line 1314. Patch to fix the problem attached.
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #1 from Jardík a213391@bofthew.com 2010-06-18 17:53:40 --- Created an attachment (id=28945) --> (http://bugs.winehq.org/attachment.cgi?id=28945) New patch
Swapped original and new files, sorry.
http://bugs.winehq.org/show_bug.cgi?id=23247
Jardík a213391@bofthew.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #28944|0 |1 is obsolete| | Attachment #28945|0 |1 is obsolete| |
--- Comment #2 from Jardík a213391@bofthew.com 2010-06-18 17:56:39 --- Created an attachment (id=28946) --> (http://bugs.winehq.org/attachment.cgi?id=28946) Patch to fix the problem
Jesus, for the last time, I hope this is right
http://bugs.winehq.org/show_bug.cgi?id=23247
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #3 from Austin English austinenglish@gmail.com 2010-06-18 18:16:23 --- Please send patches to wine-patches@winehq.org.
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #4 from Jardík a213391@bofthew.com 2010-06-18 18:37:05 --- Done.
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #5 from Jardík a213391@bofthew.com 2010-06-22 05:01:31 --- Still not fixed, patch sent to mailing list doesn't seem to had been accepted. Crash occur for example in 7-zip when showing context help.
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #6 from Dmitry Timoshkov dmitry@codeweavers.com 2010-06-22 05:05:47 --- (In reply to comment #5)
Still not fixed, patch sent to mailing list doesn't seem to had been accepted.
Did you see my comment to your patch?
http://bugs.winehq.org/show_bug.cgi?id=23247
Jardík a213391@bofthew.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|x86 |x86-64
--- Comment #7 from Jardík a213391@bofthew.com 2010-06-22 05:12:44 --- (In reply to comment #6)
(In reply to comment #5)
Still not fixed, patch sent to mailing list doesn't seem to had been accepted.
Did you see my comment to your patch?
Sure. And I told you it happens in 7-zip. Crash actually happens in your code, that is why I fixed it there and not somewhere dlls/hhctrl.ocx/chm.c,LoadWinTypeFromCHM(). Point is, I don't get why there is GetChmString(info->pCHMInfo, (DWORD_PTR)info->WinType.pszCaption) called from LoadWinTypeFromCHM when GetChmString accepts DWORD as second argument, not DWORD_PTR... and then, why there is (offset >> BLOCK_BITS) shift in GetChmString when offset is truncated pointer (?)
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #8 from Dmitry Timoshkov dmitry@codeweavers.com 2010-06-22 05:28:23 --- (In reply to comment #7)
Did you see my comment to your patch?
Sure. And I told you it happens in 7-zip. Crash actually happens in your code, that is why I fixed it there and not somewhere dlls/hhctrl.ocx/chm.c,LoadWinTypeFromCHM().
My code and possibly other parts assume that LoadWinTypeFromCHM() has initialized all the fields in the CHM header. You need to figure out why LoadWinTypeFromCHM() fails to do so, and fix it.
Point is, I don't get why there is GetChmString(info->pCHMInfo, (DWORD_PTR)info->WinType.pszCaption) called from LoadWinTypeFromCHM when GetChmString accepts DWORD as second argument, not DWORD_PTR... and then, why there is (offset >> BLOCK_BITS) shift in GetChmString when offset is truncated pointer (?)
How is that related to this bug?
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #9 from Jardík a213391@bofthew.com 2010-06-22 05:29:09 --- Problem is really maybe there (chm.c:LoadWinTypeFromCHM). IStorage_OpenStream actually fails and info->pCHMInfo->defTitle is NULL in that block, so you do strdupW(NULL) which returns NULL.
hr = IStorage_OpenStream(pStorage, windowsW, NULL, STGM_READ, 0, &pStream); if (FAILED(hr)) { ... info->WinType.pszCaption=strdupW(info->pCHMInfo->defTitle); ... return TRUE; }
And please ignore my previous comment, perhaps there are stored indexes until they are replaced (?)
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #10 from Jardík a213391@bofthew.com 2010-06-22 05:49:32 --- in ReadChmSystem() entry.code is never 0x3 so the default title is never set.
http://bugs.winehq.org/show_bug.cgi?id=23247
Jardík a213391@bofthew.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #28946|0 |1 is obsolete| |
--- Comment #11 from Jardík a213391@bofthew.com 2010-06-22 05:54:15 --- Created an attachment (id=29065) --> (http://bugs.winehq.org/attachment.cgi?id=29065) New patch
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #12 from Jardík a213391@bofthew.com 2010-06-22 05:58:19 --- Created new patch, sent to mailing list also. Set defTitle and defTopic to empty string when not found.
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #13 from Jardík a213391@bofthew.com 2010-06-26 14:11:14 --- So? It seems new patch also wasn't accepted. Why? So where should this be fixed?
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #14 from Sven septim.dt@gmail.com 2010-06-26 14:22:59 --- Because it didn't apply cleanly, according to http://source.winehq.org/patches/
I think you didn't use git to format your patch, which is highly recommended. There are nice guides on how to do this on the following pages.
http://wiki.winehq.org/SubmittingPatches http://wiki.winehq.org/GitWine
If you want to attach the files manually, you could use something like
git format-patch --keep-subject -o out origin
And send the files you find in ./out
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #15 from Jardík a213391@bofthew.com 2010-06-26 15:40:57 --- Ok, submitted to wine-patches. I'm done sending patches to wine though. I understand there are some rules to obey, but 2 line patch could be applied manually in time shorter than it took you to respond to my message. I stick to reporting bugs only and will not try to fix them by myself next time. I just don't have time to create X almost same patches and send them several times. Moreover I don't want to receive hundreds of irrelevant messages from mailing list.
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #16 from Sven septim.dt@gmail.com 2010-06-26 15:50:08 --- The idea is that if we don't do this, you'll keep sending mangled patches, which means that it'll be a lot of work for AJ on the long term. If you learn to do it right once, you'll do it right every time.
Also, you could use a different mail address for the wine lists (or a filter depending on your mail client).
http://bugs.winehq.org/show_bug.cgi?id=23247
--- Comment #17 from Sven septim.dt@gmail.com 2010-06-28 11:10:25 --- Your patch got committed as
http://source.winehq.org/git/wine.git/?a=commit;h=5b7bd76086e94ca3fb9cfb7c30...
Good job!
http://bugs.winehq.org/show_bug.cgi?id=23247
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |wylda@volny.cz Resolution| |FIXED
--- Comment #18 from Wylda wylda@volny.cz 2010-06-28 11:21:58 ---
Your patch got committed as...
Fixed then, right?
http://bugs.winehq.org/show_bug.cgi?id=23247
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #19 from Alexandre Julliard julliard@winehq.org 2010-07-02 12:35:17 --- Closing bugs fixed in 1.2-rc6.