X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=setup.c;h=276916052795c5ffa872b57a7e6723edc71dfdc4;hb=21746aa34fc99d2c73634bc9829387c27c109dbe;hp=7e0460205dc1d15007849f367d21e999f2da044c;hpb=978327f97dd3bd20f1648a2fcac601191976b18c;p=git.git diff --git a/setup.c b/setup.c index 7e0460205..276916052 100644 --- a/setup.c +++ b/setup.c @@ -170,6 +170,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)) @@ -323,7 +325,8 @@ const char *setup_git_directory_gently(int *nongit_ok) const char *gitdirenv; const char *gitfile_dir; int len, offset, ceil_offset, root_len; - int current_device = 0, one_filesystem = 1; + dev_t current_device = 0; + int one_filesystem = 1; struct stat buf; /*