Damjan Jovanovic : comctl32: Allocate the right wstr size for the TVN_GETDISPINFOW reply.
Alexandre Julliard
julliard at winehq.org
Mon Apr 20 15:01:51 CDT 2020
Module: wine
Branch: oldstable
Commit: 4fcde9a3c9789eef5a6870b3a42bef284ecbda07
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4fcde9a3c9789eef5a6870b3a42bef284ecbda07
Author: Damjan Jovanovic <damjan.jov at gmail.com>
Date: Tue Nov 26 18:08:22 2019 +0200
comctl32: Allocate the right wstr size for the TVN_GETDISPINFOW reply.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=25264
Signed-off-by: Damjan Jovanovic <damjan.jov at gmail.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit d558896fff1df9b595cb1d74ce387852c8a4eaab)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/comctl32/treeview.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 85a963ddc1..07df66566a 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -758,7 +758,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);
More information about the wine-cvs
mailing list