From cbd4d5a24e120de4ce6e2317417a47ca87b93f1f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 14 Feb 2021 20:03:42 +0300 Subject: MsgExport: fix for memory allocation problem --- plugins/Msg_Export/src/FileViewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/Msg_Export') diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp index eedbfd316d..eeb31963ab 100755 --- a/plugins/Msg_Export/src/FileViewer.cpp +++ b/plugins/Msg_Export/src/FileViewer.cpp @@ -556,7 +556,7 @@ bool bAdvancedCopy(HWND hwnd) pszSrcBuf[0] = 0; SendMessage(hwnd, EM_GETSELTEXT, 0, (LPARAM)pszSrcBuf); - HANDLE hDecMem = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, nSelLenght); + HANDLE hDecMem = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, nSelLenght * sizeof(wchar_t)); wchar_t *pszCurDec = (wchar_t*)GlobalLock(hDecMem); bool bInSpaces = false; -- cgit v1.2.3