aboutsummaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorTommi Virtanen <tv@inoi.fi>2005-11-30 17:37:10 +0200
committerJunio C Hamano <junkio@cox.net>2005-11-30 10:51:24 -0800
commit0738fc2192109f946c033b3b003cb10aace9554e (patch)
treeda145ce785c5d671d0bbf85d8ca6f34f41a322f7 /setup.c
parent562051809589574576971c53c23aad93f8c395d9 (diff)
downloadgit-0738fc2192109f946c033b3b003cb10aace9554e.tar.gz
git-0738fc2192109f946c033b3b003cb10aace9554e.tar.xz
Do not attempt to access literal dirname "GIT_OBJECT_DIRECTORY".
Dereference the environment variable before using it. Signed-off-by: Tommi Virtanen <tv@inoi.fi> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup.c b/setup.c
index cc44a724b..3286a568e 100644
--- a/setup.c
+++ b/setup.c
@@ -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 {