Skip to content

Commit

Permalink
Do not attempt to access literal dirname "GIT_OBJECT_DIRECTORY".
Browse files Browse the repository at this point in the history
Dereference the environment variable before using it.

Signed-off-by: Tommi Virtanen <tv@inoi.fi>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Tommi Virtanen authored and Junio C Hamano committed Nov 30, 2005
1 parent 5620518 commit 0738fc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static const char *setup_git_directory_1(void)
if (validate_symref(path))
goto bad_dir_environ;
if (getenv(DB_ENVIRONMENT)) {
if (access(DB_ENVIRONMENT, X_OK))
if (access(getenv(DB_ENVIRONMENT), X_OK))
goto bad_dir_environ;
}
else {
Expand Down

0 comments on commit 0738fc2

Please sign in to comment.