[Bug 25264] ExamXML crashes when opening an XML file
WineHQ Bugzilla
wine-bugs at winehq.org
Tue Nov 26 09:26:51 CST 2019
https://bugs.winehq.org/show_bug.cgi?id=25264
Damjan Jovanovic <damjan.jov at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |damjan.jov at gmail.com
--- Comment #9 from Damjan Jovanovic <damjan.jov at gmail.com> ---
Still a problem in 4.20.
The cause is a buffer size issue, due to NOT multiplying string length by
sizeof(WCHAR) when allocating a wstr. This one line patch fixes the problem:
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 0d2c825714..06c4586fcd 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -754,7 +754,7 @@ TREEVIEW_UpdateDispInfo(const TREEVIEW_INFO *infoPtr,
TREEVIEW_ITEM *item,
else {
int len = max(lstrlenW(callback.item.pszText) + 1,
TEXT_CALLBACK_SIZE);
- LPWSTR newText = heap_realloc(item->pszText, len);
+ LPWSTR newText = heap_realloc(item->pszText, len*sizeof(WCHAR));
TRACE("returned wstr %s, len=%d\n",
debugstr_w(callback.item.pszText), len);
Other graphical issues in the application still abound. Doing XML -> Collapse
Nodes, makes it impossible to expand them by clicking the "+". Right click a
node, choose "Key attribute", the resulting dialog's buttons do not react
(visually or behaviorally) to mouse clicks, and you have to click the "X" to
close the dialog.
--
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