Skip to content

Commit f89ad06

Browse files
dschovdye
authored andcommitted
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 9c97596 commit f89ad06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/mingw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ static const char *quote_arg_msys2(const char *arg)
12481248

12491249
static const char *parse_interpreter(const char *cmd)
12501250
{
1251-
static char buf[100];
1251+
static char buf[MAX_PATH];
12521252
char *p, *opt;
12531253
int n, fd;
12541254

0 commit comments

Comments
 (0)