Damjan Jovanovic : comctl32: Allocate the right wstr size for the TVN_GETDISPINFOW reply.

Alexandre Julliard julliard at winehq.org
Tue Nov 26 16:21:25 CST 2019


Module: wine
Branch: master
Commit: d558896fff1df9b595cb1d74ce387852c8a4eaab
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d558896fff1df9b595cb1d74ce387852c8a4eaab

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>

---

 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 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);




More information about the wine-cvs mailing list