Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
add: introduce add.ignoreerrors synonym for add.ignore-errors
[gitweb.git]
/
setup.c
diff --git
a/setup.c
b/setup.c
index fac34f77a7800193e636f49c799908f629540de1..68605954b45435e5b98bcebd87cfcd74bc3d92d5 100644
(file)
--- a/
setup.c
+++ b/
setup.c
@@
-169,6
+169,8
@@
static int is_git_directory(const char *suspect)
char path[PATH_MAX];
size_t len = strlen(suspect);
+ if (PATH_MAX <= len + strlen("/objects"))
+ die("Too long path: %.*s", 60, suspect);
strcpy(path, suspect);
if (getenv(DB_ENVIRONMENT)) {
if (access(getenv(DB_ENVIRONMENT), X_OK))