index e9d3f5aab63225df7f1b495a19740408d23973a8..76e5e693ccfbdcdcc763405ae026916902be830e 100644 (file)
--- a/setup.c
+++ b/setup.c
die("Not a git repository: '%s'", gitdirenv);
}
- if (!getcwd(cwd, sizeof(cwd)) || cwd[0] != '/')
+ if (!getcwd(cwd, sizeof(cwd)-1) || cwd[0] != '/')
die("Unable to read current working directory");
offset = len = strlen(cwd);