http://bugs.winehq.org/show_bug.cgi?id=34465
Bug #: 34465 Summary: process hacker 2.31 crashes in toolbar code Product: Wine Version: 1.7.1 Platform: x86 URL: http://processhacker.sourceforge.net/downloads.php OS/Version: Linux Status: NEW Keywords: download, source Severity: normal Priority: P2 Component: comctl32 AssignedTo: wine-bugs@winehq.org ReportedBy: madewokherd@gmail.com Classification: Unclassified
Created attachment 45884 --> http://bugs.winehq.org/attachment.cgi?id=45884 stack trace
This requires a couple of winsta function stubs for bug 34317.
It seems the program sends TB_GETBUTTONINFO to a toolbar with TBIF_TEXT set, but pszText and cchText set to 0. This causes a crash when we attempt to write to pszText.
One would think that the solution is to respect cchText even when there is no text to return, but I got a crash when I tried to write a test that does this on Windows. It seems Windows always crashes given NULL/0 for pszText/cchText except when a string pointer is set for the button text.
From the application source code
http://sourceforge.net/p/processhacker/code/5441/tree//2.x/trunk/plugins/Too... it looks to me like NULL/0 and the TBIF_TEXT flag will always be used, and I can't find a way that the text would be set to a string pointer without reading it in this way first. So I haven't been able to figure out how Process Hacker could work on windows when my test did not.
I don't think this happened in 2.30.
This could easily be worked around in Process Hacker, but it appears to be a Wine bug.