mirror of
https://github.com/git/git.git
synced 2026-03-19 21:20:05 +01:00
Merge branch 'ph/transport-with-gitfile' into next
* ph/transport-with-gitfile: Fix is_gitfile() for files too small or larger than PATH_MAX to be a gitfile
This commit is contained in:
@@ -868,8 +868,8 @@ static int is_gitfile(const char *url)
|
||||
return 0;
|
||||
if (!S_ISREG(st.st_mode))
|
||||
return 0;
|
||||
if (st.st_size < 10 || st.st_size > PATH_MAX)
|
||||
return 1;
|
||||
if (st.st_size < 10 || st.st_size > 9 + PATH_MAX)
|
||||
return 0;
|
||||
|
||||
fd = open(url, O_RDONLY);
|
||||
if (fd < 0)
|
||||
|
||||
Reference in New Issue
Block a user