From: Olivier Goffart Date: Thu, 20 Sep 2018 15:14:05 +0000 (+0200) Subject: Windows Shell Integration: Don't limit the size of the buffer X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~22^2~216^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=906556640da8441011d5a690f491f6026477fff2;p=nextcloud-desktop.git Windows Shell Integration: Don't limit the size of the buffer Otherwise we can't have operation that has many many filename As reported in #6780 Signed-off-by: Michael Schuster --- diff --git a/shell_integration/windows/OCContextMenu/OCClientInterface.cpp b/shell_integration/windows/OCContextMenu/OCClientInterface.cpp index 019ca5c27..f855310e5 100644 --- a/shell_integration/windows/OCContextMenu/OCClientInterface.cpp +++ b/shell_integration/windows/OCContextMenu/OCClientInterface.cpp @@ -32,7 +32,6 @@ using namespace std; #define PIPE_TIMEOUT 5*1000 //ms -#define SOCK_BUFFER 4096 OCClientInterface::ContextMenuInfo OCClientInterface::FetchInfo(const std::wstring &files) { @@ -92,9 +91,5 @@ void OCClientInterface::SendRequest(const wchar_t *verb, const std::wstring &pat return; } - wchar_t msg[SOCK_BUFFER] = { 0 }; - if (SUCCEEDED(StringCchPrintf(msg, SOCK_BUFFER, L"%s:%s\n", verb, path.c_str()))) - { - socket.SendMsg(msg); - } + socket.SendMsg((verb + (L":" + path + L"\n")).data()); }