diff --git a/plugins/farcmds/OpenCmd.cpp b/plugins/farcmds/OpenCmd.cpp index 57a4fdbf47..193242fac4 100644 --- a/plugins/farcmds/OpenCmd.cpp +++ b/plugins/farcmds/OpenCmd.cpp @@ -1055,10 +1055,10 @@ wchar_t* OpenFromCommandLine(const wchar_t *_farcmd) const wchar_t *PrefHlp=L"Contents"; BOOL showhelp=TRUE; - static wchar_t farcmdbuf[MAX_PATH*10]; // BUGBUG!!! + static wchar_t farcmdbuf[8192 - MAX_PATH]; wchar_t *farcmd=farcmdbuf; - lstrcpy(farcmdbuf, _farcmd); + lstrcpyn(farcmdbuf, _farcmd, ARRAYSIZE(farcmdbuf)); FSF.RTrim(farcmdbuf); if (lstrlen(farcmd) > 3) diff --git a/plugins/farcmds/changelog b/plugins/farcmds/changelog index 608b1316f9..84231732c0 100644 --- a/plugins/farcmds/changelog +++ b/plugins/farcmds/changelog @@ -1,3 +1,7 @@ +drkns 2023-08-26 15:09:46+01:00 - build 130 + +1. gh-719: FAR Commands plugin crashes Far when command line is long. + drkns 2020-03-25 10:32:35+02:00 - build 129 1. Incorrect COM initialisation. diff --git a/plugins/farcmds/version.hpp b/plugins/farcmds/version.hpp index 7f1ebaa948..046371d64f 100644 --- a/plugins/farcmds/version.hpp +++ b/plugins/farcmds/version.hpp @@ -1,6 +1,6 @@ #include -#define PLUGIN_BUILD 129 +#define PLUGIN_BUILD 130 #define PLUGIN_DESC L"FAR Commands Plugin for Far Manager" #define PLUGIN_NAME L"FARCmds" #define PLUGIN_FILENAME L"FARCmds.dll"