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>
This commit is contained in:
parent
5620518095
commit
0738fc2192
2
setup.c
2
setup.c
@ -116,7 +116,7 @@ static const char *setup_git_directory_1(void)
|
|||||||
if (validate_symref(path))
|
if (validate_symref(path))
|
||||||
goto bad_dir_environ;
|
goto bad_dir_environ;
|
||||||
if (getenv(DB_ENVIRONMENT)) {
|
if (getenv(DB_ENVIRONMENT)) {
|
||||||
if (access(DB_ENVIRONMENT, X_OK))
|
if (access(getenv(DB_ENVIRONMENT), X_OK))
|
||||||
goto bad_dir_environ;
|
goto bad_dir_environ;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user