Skip to content

Commit

Permalink
gh-719: FAR Commands plugin crashes Far when command line is long
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Aug 26, 2023
1 parent 579fcd9 commit 6061025
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/farcmds/OpenCmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions plugins/farcmds/changelog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion plugins/farcmds/version.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <farversion.hpp>

#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"
Expand Down

0 comments on commit 6061025

Please sign in to comment.