Skip to content

Commit 83e1ace

Browse files
committed
Merge branch 'fix-unc-buffer-overflow'
This fixes `git status` in a Git worktree at the top of a file share. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents eb22157 + 962d749 commit 83e1ace

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ static const char *setup_discovered_git_dir(const char *gitdir,
760760
set_git_dir(gitdir);
761761
inside_git_dir = 0;
762762
inside_work_tree = 1;
763-
if (offset == cwd->len)
763+
if (offset >= cwd->len)
764764
return NULL;
765765

766766
/* Make "offset" point past the '/' (already the case for root dirs) */

0 commit comments

Comments
 (0)