diff options
author | George Hazan <ghazan@miranda.im> | 2023-04-19 20:19:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-04-19 20:19:39 +0300 |
commit | d023a824d07d23902e0406b86af0af5fda309765 (patch) | |
tree | 22de14f6e04d20732e3c977c75516d70aa978b37 | |
parent | 211185164cd3728e85736c938a05443519e8af9a (diff) |
Utils_ClipboardCopy: fix for allocation length
-rw-r--r-- | src/mir_core/src/Windows/winutil.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mir_core/src/Windows/winutil.cpp b/src/mir_core/src/Windows/winutil.cpp index 1d18041529..d512e5ecf2 100644 --- a/src/mir_core/src/Windows/winutil.cpp +++ b/src/mir_core/src/Windows/winutil.cpp @@ -147,7 +147,7 @@ MIR_CORE_DLL(void) Utils_ClipboardCopy(const char *pszText) EmptyClipboard();
- HGLOBAL hData = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, cbLen);
+ HGLOBAL hData = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, cbLen+1);
if (hData) {
mir_strcpy((char *)GlobalLock(hData), pszText);
GlobalUnlock(hData);
|