diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-07-01 12:34:46 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-06 12:52:50 +0200 |
commit | 77825cacab441fb4f69fe5179842d9d1ecf59440 (patch) | |
tree | e37e62942c8e2e7356649facffc23d7d64c7ccc4 | |
parent | 7ec83deb0f79019c29ede29dc330b0b31b5d57c0 (diff) |
tdf#92269 fix Windows Explorer crash caused by shellextension
wcscpy_s is buffer size, not string length, so size must also account
for a terminating NULL
Change-Id: Ie69692e47c142f3b733b093d0b87fa4bb03db7b4
(cherry picked from commit 2279f1f0227fc232356a7f5afc60eead77914b89)
Reviewed-on: https://gerrit.libreoffice.org/16653
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | shell/source/win32/shlxthandler/infotips/infotips.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/source/win32/shlxthandler/infotips/infotips.cxx b/shell/source/win32/shlxthandler/infotips/infotips.cxx index 657bcf279d12..94d86c23fc67 100644 --- a/shell/source/win32/shlxthandler/infotips/infotips.cxx +++ b/shell/source/win32/shlxthandler/infotips/infotips.cxx @@ -289,7 +289,7 @@ HRESULT STDMETHODCALLTYPE CInfoTip::GetInfoTip(DWORD /*dwFlags*/, wchar_t** ppws ZeroMemory(pMem, len); - wcscpy_s(pMem, msg.length(), msg.c_str()); + wcscpy_s(pMem, msg.length()+1, msg.c_str()); *ppwszTip = pMem; lpMalloc->Release(); |