Skip to content

Commit 7af9204

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 29dcfc1 + 3414c91 commit 7af9204

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
@@ -758,7 +758,7 @@ static const char *setup_discovered_git_dir(const char *gitdir,
758758
set_git_dir(gitdir);
759759
inside_git_dir = 0;
760760
inside_work_tree = 1;
761-
if (offset == cwd->len)
761+
if (offset >= cwd->len)
762762
return NULL;
763763

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

0 commit comments

Comments
 (0)