From 3fef8ba99222f5c82d56b4acfb3a07afbaa8364b Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 25 Feb 2024 19:14:00 +0600 Subject: [PATCH] Replace an instance of MAX_PATH with 32767 ... which is the approximate maximum of Windows API, as documented in https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation Change-Id: I78524891d89e34fb1569bf1d32161a96079f0f6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163909 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski --- shell/source/win32/simplemail/smplmailclient.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/source/win32/simplemail/smplmailclient.cxx b/shell/source/win32/simplemail/smplmailclient.cxx index d40577892cb3..333277353d03 100644 --- a/shell/source/win32/simplemail/smplmailclient.cxx +++ b/shell/source/win32/simplemail/smplmailclient.cxx @@ -67,7 +67,7 @@ namespace /* private */ LONG lret = RegOpenKeyW(HKEY_CURRENT_USER, L"Software\\LibreOffice\\SendAsEMailClient", &hkey); if (lret == ERROR_SUCCESS) { - wchar_t buff[MAX_PATH]; + wchar_t buff[32767]; LONG sz = sizeof(buff); lret = RegQueryValueW(hkey, nullptr, buff, &sz); if (lret == ERROR_SUCCESS)