Skip to content

Commit 32afcd2

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
mingw: allow for longer paths in parse_interpreter()
As reported in newren/git-filter-repo#225, it looks like 99 bytes is not really sufficient to represent e.g. the full path to Python when installed via Windows Store (and this path is used in the hasb bang line when installing scripts via `pip`). Let's increase it to what is probably the maximum sensible path size: MAX_PATH. This makes `parse_interpreter()` in line with what `lookup_prog()` handles. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Vilius Šumskas <[email protected]>
1 parent 2ed6f25 commit 32afcd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/mingw.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ static const char *quote_arg_msys2(const char *arg)
13391339

13401340
static const char *parse_interpreter(const char *cmd)
13411341
{
1342-
static char buf[100];
1342+
static char buf[MAX_PATH];
13431343
char *p, *opt;
13441344
ssize_t n; /* read() can return negative values */
13451345
int fd;

0 commit comments

Comments
 (0)