summaryrefslogtreecommitdiff
path: root/pack-objects.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-04-20 21:25:37 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-04-21 07:45:10 (GMT)
commit0dec30b9788b12fdae5d5b69fc366a28bb688d80 (patch)
treec5672a906a67000c3cd233b3a3eb4a01e031af3c /pack-objects.c
parent757319309ac26d136d6f21a40c81fb53073c5dc9 (diff)
downloadgit-0dec30b9788b12fdae5d5b69fc366a28bb688d80.zip
git-0dec30b9788b12fdae5d5b69fc366a28bb688d80.tar.gz
git-0dec30b9788b12fdae5d5b69fc366a28bb688d80.tar.bz2
fix pack-object buffer size
The input line has 40 _chars_ of sha1 and no 20 _bytes_. It should also account for the space before the pathname, and the terminating \n and \0. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'pack-objects.c')
-rw-r--r--pack-objects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-objects.c b/pack-objects.c
index f7d6217..c0acc46 100644
--- a/pack-objects.c
+++ b/pack-objects.c
@@ -1231,7 +1231,7 @@ static void setup_progress_signal(void)
int main(int argc, char **argv)
{
SHA_CTX ctx;
- char line[PATH_MAX + 20];
+ char line[40 + 1 + PATH_MAX + 2];
int window = 10, depth = 10, pack_to_stdout = 0;
struct object_entry **list;
int num_preferred_base = 0;