Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'maint-1.6.4' into maint-1.6.5
[gitweb.git]
/
setup.c
diff --git
a/setup.c
b/setup.c
index 4272ec0ef2fd833923a5303286a0dd237ec6eab8..a614f125c30392cee59c1efa5c7bafb472c6e38a 100644
(file)
--- a/
setup.c
+++ b/
setup.c
@@
-156,6
+156,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))