git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Do not attempt to access literal dirname "GIT_OBJECT_DIRECTORY".

From
TVTommi Virtanen <tv@inoi.fi>
Date
Nov 30, 2005, 15:37 UTC
Message-ID
<11333650304031-git-send-email-tv@inoi.fi>
Dereference the environment variable before using it.
Signed-off-by: Tommi Virtanen <tv@inoi.fi>
---
 setup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

applies-to: fa10b18d1546129bf73713b64fbc4a8feae3487f a4a0e60f920f906284f4f6a4d3b4ffb043834bc7

diff --git a/setup.c b/setup.c
index cc44a72..3286a56 100644
--- a/setup.c
+++ b/setup.c
@@ -116,7 +116,7 @@ static const char *setup_git_directory_1
 		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 {
---
0.99.9.GIT
Message 1 of 1 in “Do not attempt to access literal dirname "GIT_OBJECT_DIRECTORY".”
  1. Do not attempt to access literal dirname "GIT_OBJECT_DIRECTORY".Tommi Virtanen, Nov 30, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.