[Bug 46407] New: mCtrl: example-imgview test program crashes
wine-bugs at winehq.org
wine-bugs at winehq.org
Thu Jan 3 07:16:43 CST 2019
https://bugs.winehq.org/show_bug.cgi?id=46407
Bug ID: 46407
Summary: mCtrl: example-imgview test program crashes
Product: Wine
Version: 4.0-rc4
Hardware: x86
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: user32
Assignee: wine-bugs at winehq.org
Reporter: bunglehead at gmail.com
Distribution: ---
This is split up from bug 41203 to target specific issue.
Copied of relevant comment:
---
I think that I found the bug that makes the imgview control crashing.
When the WM_NCCREATE message is sent to the control, the lpszName field of
CREATESTRUCT contains a wrong value.
On WINE, this pointer is set to the resource ID.
On Windows, this pointer is set to a string with first character set to 0xFFFF
and the second character is set to the resource ID.
The mCtrl code of imgview control checks if lpszName is not NULL and test for
the first character:
https://github.com/mity/mctrl/blob/master/mctrl/imgview.c#L290
but since the pointer is set to the resource value rather than a valid pointer,
it crashes. This is the reason.
Evidently, there is a bug here into DIALOG_CreateIndirect:
http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/user32/dialog.c#l610
The code should create the string properly formatted here if it is a resource,
for both the class and the caption.
---
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list