summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8bb2b51)
raw | patch | inline | side by side (parent: 8bb2b51)
author | Matthias Lederhofer <matled@gmx.net> | |
Sun, 11 Mar 2007 01:35:00 +0000 (02:35 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 11 Mar 2007 05:47:45 +0000 (21:47 -0800) |
don't tell getcwd that the buffer has one spare byte for an extra /
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
setup.c | patch | blob | history |
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);